Project type: Agentic AI / Retrieval‑Augmented Generation
Domain: Technical documentation QA (Blender 3D)
Repository: https://github.com/mor-dar/blender-rag-assistant (GitHub)
License: CC‑BY‑SA 4.0 (project code and incorporated manual excerpts) (GitHub, docs.blender.org)
Blender Bot is a retrieval‑augmented assistant for the Blender 3D Manual that answers “how‑to” questions with grounded explanations and clickable citations back to the official docs. The system ingests and cleans the manual’s HTML, semantically chunks the content, and indexes it in ChromaDB using sentence‑transformer embeddings. At query time it performs top‑K similarity search and prompts an LLM (default Llama‑3.1‑8B‑Instant via Groq, with OpenAI as an option) to compose faithful answers strictly from the retrieved context. The assistant is available via a CLI and a Streamlit web UI, and can be launched with a Docker one‑liner without local setup. A small, reproducible mini‑evaluation reports retrieval recall, MRR, and latency on a demo subset of the manual (see the Evaluation section and script). The project preserves CC‑BY‑SA 4.0 attribution for the Blender Manual and surfaces sources in every answer.
Blender Bot is a retrieval‑augmented assistant that answers questions about Blender using only the official Blender Manual as its knowledge source. The system parses and cleans the manual’s HTML, semantically chunks the content, indexes it in ChromaDB, and serves grounded, cited answers via a CLI or a Streamlit web UI. It supports Groq (default: Llama‑3.1‑8B‑Instant) or OpenAI LLMs, with behavior configured through environment variables. (GitHub)
Why this matters. Tool and version‑specific “how‑to” queries often trigger hallucinations in generic chatbots. By constraining generation strictly to retrieved, cited passages from the Blender Manual—licensed under CC‑BY‑SA 4.0—the assistant improves precision while respecting attribution. (docs.blender.org)
.env
) covering model selection (Groq/OpenAI), embeddings, chunking, retrieval, caching, and optional conversation memory (window/summary). (GitHub)Figure 1: Data preparation workflow
Implementation hints & structure appear in the repo’s README (e.g., “Document Processing,” “Vector Builder,” and semantic chunking notes). (GitHub)
CHROMA_PERSIST_DIRECTORY
, CHROMA_COLLECTION_NAME
).multi-qa-MiniLM-L6-cos-v1
, batchable on CPU/CUDA.CHUNK_SIZE
, CHUNK_OVERLAP
, USE_SEMANTIC_CHUNKING
, etc.). (GitHub)Prompting: A context‑only instruction with numbered citations [1]
, [2]
, … and a clean “Sources” list with working Blender‑manual URLs.
Models: Groq (default Llama‑3.1‑8B‑Instant) or OpenAI (temperature and max tokens configurable for both through environment variables).
Interfaces:
python main.py
(or --cli
).python main.py --web
→ open http://localhost:8501
. (GitHub)Figure 2: Query handling workflow
multi-qa-MiniLM-L6-cos-v1
, k=5.python scripts/evaluate_demo.py --autobuild-demo \ --persist_dir ./data/vector_db --collection blender_docs --k 5 # Artifacts: outputs/eval_demo.md and outputs/eval_demo.json
Metric | Value |
---|---|
Queries | 10 |
k | 5 |
Recall@1 | 1.0 |
Recall@3 | 1.0 |
MRR | 1.0 |
Median latency (s) | 0.012 |
Full per-query table: include outputs/eval_demo.md as a file attachment, and optionally link to outputs/eval_demo.json for raw metrics.
# Single line to run the web demo (includes data download & DB build) docker run -p 8501:8501 -e GROQ_API_KEY=$GROQ_API_KEY \ -v "$(pwd)/data:/app/data" mdar/blender-rag-assistant:v1.0.5 evaluate-web # For the full manual - a 2 step process is recommended: # 1) Build full knowledge base with pre-built image - results persist to disk docker run -v "$(pwd)/data:/app/data" mdar/blender-rag-assistant:v1.0.5 build-full # 2) Run web UI against existing full DB docker run -p 8501:8501 -v "$(pwd)/data:/app/data" mdar/blender-rag-assistant:v1.0.5 run-web
# 1) Install pip install -r requirements.txt # 2) Configure at least one provider # Groq (default) export GROQ_API_KEY=... # or OpenAI export OPENAI_API_KEY=... # 3) Run CLI or Web python main.py # CLI (default) python main.py --web # Streamlit @ http://localhost:8501
Key environment variables (examples):
GROQ_MODEL=llama-3.1-8b-instant
· OPENAI_MODEL=gpt-4
· EMBEDDING_MODEL=multi-qa-MiniLM-L6-cos-v1
· CHUNK_SIZE=512
· CHUNK_OVERLAP=50
· USE_SEMANTIC_CHUNKING=true
· RETRIEVAL_K=5
· MEMORY_TYPE=none|window|summary
. See .env.example
in the repo for the full set. (GitHub)
# Build image docker build -t blender-rag-assistant . # Run CLI docker run --rm -it \ -e GROQ_API_KEY=$GROQ_API_KEY \ blender-rag-assistant python main.py # Run Web UI docker run --rm -it -p 8501:8501 \ -e GROQ_API_KEY=$GROQ_API_KEY \ blender-rag-assistant python main.py --web
A Dockerfile
and docker-entrypoint.sh
are included in the repository. (GitHub)
(This section’s structure and emphasis follows Ready Tensor’s recommended publication practices and rubric.) (app.readytensor.ai)
# Example: pick OpenAI instead of Groq export OPENAI_API_KEY=... export OPENAI_MODEL=gpt-4 python main.py --web # Tune retrieval export RETRIEVAL_K=8 export SIMILARITY_THRESHOLD=0.65 python main.py --cli
(Variables per the repo’s documented configuration matrix.) (GitHub)