PERSONAL RAG TOOLKIT — REVIEWED SOURCE EXCERPTS Reviewed: 29 October 2026 Source: rag_system/core/query_engine.py Independent project. Source inspection, not a runtime demonstration. Two excerpts; indentation normalized; intervening code omitted. Request relevant passages from a selected collection (lines 78–86) ```python query_embedding = self.embedding_generator.generate_embeddings([query])[0] # Query vector store results = self.vector_store.query( collection_name=domain, query_embeddings=[query_embedding], n_results=top_k, where=metadata_filter, ) ``` Keep the passage and its source metadata together (lines 115–123) ```python search_results.append( SearchResult( content=results["documents"][0][i], score=similarity, metadata=metadata, document_id=results["ids"][0][i], source_file=metadata.get("file_path", "unknown"), ) ) ``` These excerpts show collection selection, a top-k request, an optional metadata filter and source metadata on results. They are not a complete runnable example. Metadata filtering is not an access-control system. Source metadata does not prove an answer is correct. No provider calls, ingestion or end-to-end retrieval were run for this review. No accuracy, latency, savings or production-readiness result is claimed.