Search docs

Templates

RAG System

Generate the retrieval-augmented generation scaffold.

Best for: documentation Q&A, knowledge base search, document retrieval.

Prompts:

text
? Choose extras (space to toggle, enter to confirm)
 ● ruff
 ● pytest
 ○ github-actions
 ○ pre-commit
 ○ mypy

RAG System uses a fixed stack — LlamaIndex + ChromaDB + OpenAI — so there's no framework or provider prompt, unlike Chatbot and Agent. On first run, it automatically ingests documents from data/ into a local ChromaDB index, then lets you ask questions against them. Requires an OPENAI_API_KEY (used for both the LLM and embeddings).

Available extras: ruff pytest github-actions pre-commit mypy

Run it:

bash
cd my-rag
# Add OPENAI_API_KEY to .env
uv run python -m src.main
# Documents are ingested automatically on first run

Captured project structure#

These paths come from the verified Spawn v1.2.0 rag capture (21 files). This recorded run used --no-git --no-uv; selecting setup tools can add files.

text
ledger-search/
├── .env.example
├── .gitignore
├── .spawn/
│   └── meta.json
├── AGENTS.md
├── CHANGELOG.md
├── data/
│   └── sample_knowledge.md
├── LICENSE
├── README.md
├── src/
│   ├── __init__.py
│   ├── config/
│   │   ├── __init__.py
│   │   └── settings.py
│   ├── ingestion/
│   │   ├── __init__.py
│   │   └── ingest.py
│   ├── knowledge/
│   │   ├── __init__.py
│   │   └── index.py
│   ├── main.py
│   └── retrieval/
│       ├── __init__.py
│       └── retrieve.py
└── tests/
    ├── __init__.py
    ├── conftest.py
    └── test_rag.py
ESC