How hemantmoree/repognition works
Project type and purpose
• This is a Python-based command-line and Streamlit tool (“Repo-gnition”) that implements a Retrieval-Augmented Generation (RAG) pipeline.
• Its purpose is to index arbitrary GitHub codebases into a local FAISS vector store and then answer natural-language questions about the code with direct source citations.
File structure
• Top-level directories:
• app/ – Streamlit and Typer-based frontends (app/main.py, app/cli.py)
• config/ – Global settings (config/settings.py)
• src/components/ – Core building blocks: git_cloner, chunker, vectorstore
• src/parsers/ – Language-specific parsers (Python, Java, JS, Markdown)
• src/llm/ – Ollama client for embeddings & generations
• src/pipeline/ – Orchestrators: indexing.py & querying.py
• src/utils/ – Helpers (cache_manager, gitignore_loader)
• Supporting files: requirements.txt, setup.py, pytest.ini, tests/
README for additional insights
• Two-phase flow:
A. Indexing: clone → parse & chunk → enrich (LLM summaries & keywords) → embed → store in FAISS
B. Querying: embed(question) → retrieve top chunks → generate answer (LLM) → present with citations
• Uses local Ollama models for both embeddings and generation.
• Provides both CLI commands (repognition index/query) and a Streamlit UI.
• Basic and detailed flowcharts are in assets/basic_flow_chart.png and assets/flowchart.png.
Key reminders
• Every distinct component in src/ (components, parsers, llm, pipeline, utils).
• How config/settings.py drives model choice & directories.