Skip to content

Latest commit

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

DocuBot — RAG-Powered Q&A for Angular & Spring Boot Docs

A Retrieval-Augmented Generation (RAG) system that answers technical questions about Angular and Spring Boot by retrieving relevant content directly from their official documentation and generating grounded, cited answers.

Built as a hands-on learning project to demonstrate practical AI engineering skills: retrieval pipelines, embeddings, vector search, query routing, and LLM-based generation.

Why this project

Generic LLMs often hallucinate or give outdated answers for fast-moving frameworks like Angular and Spring Boot. DocuBot grounds every answer in real, current documentation — and cites its sources — so answers are trustworthy and verifiable.

How it works

  1. Ingestion — Pulls curated source docs directly from the official Angular and Spring Boot GitHub repositories (Markdown for Angular, AsciiDoc for Spring Boot).
  2. Chunking — Splits docs into meaningful sections (by heading, keeping code blocks intact), preserving metadata (source file, title, URL) for citations.
  3. Embedding — Converts chunks into vector embeddings using a free local model (sentence-transformers).
  4. Vector store — Indexes embeddings in a local Chroma database for fast semantic search.
  5. Query routing — Classifies incoming questions as Angular- or Spring Boot-related (or both) to narrow retrieval.
  6. Retrieval — Finds the most relevant chunks for a given question.
  7. Generation — Sends the question + retrieved context to an LLM (via Groq's free tier) to produce a grounded answer with source citations.
  8. Interface — A Streamlit app for asking questions interactively.

Tech stack

ComponentToolWhy
Embeddingssentence-transformers (all-MiniLM-L6-v2)Free, local, no API key needed
Vector storeChromaFree, local, simple to set up
LLM generationGroq (Llama / Mixtral)Free tier, fast inference
InterfaceStreamlitQuick to build, easy to demo
Data sourcesOfficial Angular & Spring Boot GitHub reposClean, structured source docs

Project status

This project is being built step by step. Progress so far:

  • Project scaffolding
  • Confirmed and verified source doc file paths (Angular + Spring Boot)
  • Data ingestion script
  • Chunking pipeline
  • Embedding + vector store indexing
  • Retrieval + query routing logic
  • LLM generation integration
  • Streamlit interface
  • Evaluation set (~20–30 test questions) to measure retrieval/answer quality

Data sources

Angularadev/src/content/guide/ from angular/angular

  • Components, Templates, Directives, Dependency Injection, Routing, Forms, HTTP Client, Signals

Spring Bootspring-boot-docs/src/docs/antora/modules/reference/pages/ from spring-projects/spring-boot

  • Using Spring Boot, Core Features (auto-configuration, external config, profiles, logging), Web (Servlet/Reactive), Data Access (SQL/NoSQL), Actuator

Docs are pulled from the latest stable release source rather than scraped from rendered HTML — this keeps the data clean and preserves structure for chunking.

Project structure

rag-docs-bot/
├── data/
│ ├── raw/ # Raw downloaded doc files (untouched)
│ └── processed/ # Chunked, cleaned data ready for embedding
├── src/ # Core pipeline code (ingestion, chunking, retrieval, generation)
├── tests/ # Evaluation question set + retrieval quality tests
├── requirements.txt
└── README.md

Setup (once ingestion is built)

git clone cd rag-docs-bot
pip install -r requirements.txt

You'll also need a free Groq API key set as an environment variable:

Further run instructions will be added as each pipeline stage is completed.

Roadmap / stretch goals

  • Source citations shown alongside every answer
  • Query routing between Angular and Spring Boot contexts
  • Evaluation harness to measure retrieval precision/recall on a held-out question set
  • Graceful "I don't know" handling when docs don't cover a topic
  • Expand from curated subset to full documentation coverage

Releases

Packages

Contributors

Languages