How 2501pr0ject/rustsensei works
RustSensei is a French-language local Rust tutor. Its main workflow takes a question from the web UI or CLI through chat handling, optionally retrieves relevant Rust documentation and citations, then generates an answer with local llama.cpp; the API can reuse cached responses. Separate documented capabilities include the French/English Rust concept graph, streaming UI, and automated evaluation. Edges follow shown calls or README statements; unsampled integrations are omitted rather than inferred.
Main entry points: api.py Chat API · rag.py Hybrid retrieval · chat.py Chat workflow · inference.py Inference settings
Components 18
Answer generation
- Chat workflow
app/chat.py - Response cache
app/cache.py - Inference settings
app/inference.py - Server manager
app/llama_server.py - llama.cpp runtime
- Model settings
configs/model_config.yaml
Rust knowledge
- Hybrid retrieval
app/rag.py - Concept graph
app/knowledge.py - RAG index
rag/index - Rust documentation
rag/docs - RAG settings
configs/rag_config.yaml
Evaluation
- Evaluation runner
scripts/evaluate.py - Evaluation prompts
eval/prompts_fr.jsonl - Rust compilation check
scripts/compile_check.py
Other components
- Learner
Connections 20
- Learner → Web chat: asks via
README.md - Learner → Chat CLI: asks via
README.md - Web chat → Chat API: calls
README.md - Chat CLI → Chat workflow: starts
app/cli.py - Chat API → Hybrid retrieval: retrieves with
app/api.py - Chat API → Response cache: checks
app/api.py - Chat API → Server manager: streams through
app/api.py - Chat workflow → Hybrid retrieval: retrieves with
app/chat.py - Chat workflow → Response cache: checks
app/chat.py - Chat workflow → Inference settings: uses settings
app/chat.py - Server manager → llama.cpp runtime: starts
app/llama_server.py - Chat API → Inference settings: formats sampling
app/inference.py - Hybrid retrieval → Concept graph: expands queries
app/rag.py - Hybrid retrieval → RAG index: searches
README.md - Rust documentation → RAG index: indexed into
README.md - Model settings → Inference settings: configures
README.md - RAG settings → Hybrid retrieval: configures
README.md - Evaluation runner → Evaluation prompts: evaluates
README.md - Evaluation runner → Rust compilation check: checks code with
scripts/evaluate.py - Evaluation runner → Inference settings: uses settings
scripts/evaluate.py