Repository navigation
Conversation
ruff --fix with the safe rules only (F401, W293, I001, UP017, UP035, UP015): no logic changes. pytest: 261 passed in 79.58s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…art_training silently broke run history)
…ng, strict zips, unused loop vars, E402)
…i_agent and scripts)
…ict module section, Request param fix)
…ns, dict-invariance fix, isinstance guards)
…tics, llm_client, memory, vector store, entrypoint test)
…tions with ground truth)
evals.dataset turns corpus/*.md + questions.json into frozen dataclasses (CorpusDoc, Question, EvalDataset) with validation: non-empty docs, unique question ids, well-formed fields, and cross-check that every source_docs reference resolves to a real document. 16 tests pin the committed dataset (12 docs, q01-q48, 4 cross-doc questions) and cover all error paths.
evals.metrics scores document-level retrieval quality: recall_at_k, reciprocal_rank (raw chunk ranks), hit_at_k, plus QuestionResult and summarize() -> MetricsSummary(mean_recall@k, mrr, hit_rate@k). Semantics match what the pipeline actually consumes: the top-k cutoff applies to chunks (repeats occupy slots) and each document counts once within a cutoff. 23 tests cover perfect/partial/zero recall, cutoff boundaries, rank shifts from repeats, error paths, and hand-computed aggregates.
evals.index.build_index chunks every corpus document with the production chunker (app.services.rag.chunking) and indexes the chunks in a fresh in-memory VectorStore, so the evaluation measures exactly what the RAG pipeline does. Chunking parameters default to settings.rag_chunk_size/rag_chunk_overlap; the embedder is injected via a BatchEmbedder protocol (tests use a deterministic content-hashed fake, the runner will pass EmbeddingClient). Returns IndexBuildResult(store, num_chunks, chunks_per_doc); dimension is inferred from the embedder output. 11 tests: chunk counts/metadata/ordering vs the production chunker, single batch call in doc order, self-query ranks own doc first at score ~1.0, error paths, full committed corpus builds, and defaults-follow-settings.
Services persist under settings.data_dir and some are built at import time, so the suite appended to data/sessions.json on every run until it reached 24 GB and saving it raised MemoryError. conftest now points data_dir at a throwaway temp folder before anything is imported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checks README.md and every docs/*.md for em/en dashes, backticked repo paths that do not exist (after cutting :line / ::name suffixes), and unclosed mermaid blocks. Keeps passing while those files are still missing. docs/EVAL.md: replaced 16 em dashes with colons/semicolons/commas so the new test passes; README.md needed no changes. Full suite: 425 passed in 84s (junitxml: 0 failures, 0 skipped).
Intro paragraph plus a 15-row Module/Responsibility table, one sentence per module from its docstring and main class. Two spec paths were stale and are documented as they actually exist: app/services/rag/bm25.py (not keyword.py) and evals/runner.py (there is no app/eval package; the eval harness lives in top-level evals/). Full suite: 425 passed in 85s (junitxml: 0 failures, 0 skipped); test_docs validates every backticked path.
Two sections with mermaid diagrams, every function name verified against the code first: 'Chat with documents' (sequenceDiagram browser -> chat route -> RAGService.query -> VectorStore.search and KeywordIndex.search when RAG_HYBRID includes the keyword leg -> LLMService.chat) and 'Document upload' (flowchart POST /documents/upload through extract_text, DocumentService.store_document, chunk_text, EmbeddingClient.embed_batch, VectorStore.add plus the OllamaServiceError rollback). Five numbered lines under each diagram with backticked file paths. Full suite: 425 passed in 85s (junitxml: 0 failures, 0 skipped); test_docs validates the mermaid blocks and every path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes Apollo recruiter-ready: lint, types, tests, retrieval evals, hybrid search, Docker and docs.
What changed
RAG_HYBRID(auto, vector or keyword).data/folder.Checks
pytest: 425 passed (run locally twice).🤖 Generated with Claude Code