How vikasjha2003/askme-ai works
AskMe AI is a CLI for PDF-grounded question answering and retrieval experiments. In interactive Q&A, a user selects a PDF and chunking method; the app loads and chunks it, creates a Chroma store, then retrieves context and asks a local LLM to answer. Its benchmark mode compares retrieval across chunking strategies against a QA set and can generate per-question answers. The workflow is documented in the README and partly visible in excerpts; benchmark internals are represented only where the README describes them.
Main entry points: main.py CLI workflow · benchmark.py Retrieval benchmark · result_generator.py Answer evaluation · vector_store.py Vector indexing
Components 15
Document ingestion
- PDF loader
src/doc_loader.py - Runtime paths
src/config.py
Chunking and retrieval
- Chunk strategies
src/chunker.py - Embeddings
src/embedding.py - Vector indexing
src/vector_store.py - MMR retrieval
src/retriever.py - Chroma store
src/vector_store.py
Grounded answering
- RAG prompt
src/rag.py - Local generation
src/local_llm.py
Benchmark and results
- Retrieval benchmark
src/benchmark.py - Evaluation questions
src/data/questions_and_answers/apple_2025_annual_report.json - Answer evaluation
src/result_generator.py - Saved results
Other components
- CLI user
- CLI workflow
src/main.py
Connections 24
- CLI user → CLI workflow: chooses mode
src/main.py - CLI workflow → PDF loader: loads PDF
src/main.py - CLI workflow → Chunk strategies: creates chunks
src/main.py - CLI workflow → Vector indexing: indexes chunks
src/main.py - CLI workflow → RAG prompt: asks question
src/main.py - PDF loader → Chunk strategies: provides documents
README.md - Chunk strategies → Vector indexing: provides chunks
README.md - Vector indexing → Embeddings: embeds chunks
src/vector_store.py - Vector indexing → Chroma store: writes vectors
src/vector_store.py - MMR retrieval → Embeddings: embeds query
src/retriever.py - MMR retrieval → Chroma store: searches vectors
README.md - RAG prompt → MMR retrieval: fetches context
src/rag.py - RAG prompt → Local generation: sends prompt
src/rag.py - CLI workflow → Retrieval benchmark: runs evaluation
src/main.py - Retrieval benchmark → Evaluation questions: reads questions
README.md - Retrieval benchmark → Chunk strategies: compares methods
README.md - Retrieval benchmark → Vector indexing: builds stores
README.md - Retrieval benchmark → Saved results: saves metrics
README.md - CLI workflow → Answer evaluation: generates answers
src/main.py - Answer evaluation → Evaluation questions: reads questions
README.md - Answer evaluation → MMR retrieval: retrieves context
src/result_generator.py - Answer evaluation → Local generation: generates answers
src/result_generator.py - Answer evaluation → Saved results: writes outputs
- Runtime paths → Chroma store: sets store path
src/vector_store.py