How semphares/rag_spec_bot works
Project type and purpose
• This is a Python-based Retrieval-Augmented Generation (RAG) “spec bot” utility library and CLI application.
• Its goal is to load and split documentation, index it in a vector store, retrieve relevant passages at query time, build prompts via templates, and invoke various LLM back-ends to generate or summarize specifications.
File structure
• Top-level files:
• Makefile / requirements.txt – install and run conveniences;
• README.md – minimal usage instructions;
• __init__.py – makes the root a Python package.
• app/specbot/ – core package directory:
• config.py & config.json & .env – hold environment variables and configuration;
• doc_loader/ – loads raw documents, splits them into chunks, utilities for parsing;
• retriever/ – transforms doc chunks (e.g. embeddings via sentence_transformer), custom search logic, vectorstore persistence;
• model_api/ – adapters for different LLM back-ends (Gemini, LlamaCpp, Ollama), common LLM typing;
• prompter/ – prompt construction and templating (contexts, summarization);
• utils/ – logging, helper functions;
• spec_app.py – CLI entrypoint or orchestrator script.
README for additional insights
• Basic usage: “make install” and “make run”—no explicit web server or UI, implying a CLI/daemon mode.