How mickunaru/askthespire works
AskTheSpire is a Slay the Spire 2 wiki-grounded question-answering application. Users ask questions in the Streamlit UI, which invokes the RAG pipeline: optional query expansion, hybrid retrieval, and Claude answer generation with cited sources. Its corpus is built by scraping three documented sources, converting records into typed chunks, embedding them, and indexing them in Chroma. The README also documents RAGAS evaluation. The main stages and their documented links are shown; source-level detail is limited to the excerpts and reference index provided.
Main entry points: pipeline.py RAG Orchestrator · chunker.py Typed Chunking · retriever.py Hybrid Retrieval · indexer.py Chroma Indexing
Components 17
Corpus Ingest
- StratGG Scraper
scraper/scrape_stratgg.py - STS2 Wiki Scraper
scraper/scrape_sts2wiki.py - Patch Scraper
scraper/scrape_patches.py - Typed Chunking
pipeline/chunker.py - Chunk Metadata
pipeline/metadata.py
Indexing
- Text Embeddings
pipeline/embedder.py - Chroma Indexing
pipeline/indexer.py - Chroma Store
Question Answering
- Streamlit UI
ui/app.py - RAG Orchestrator
rag/pipeline.py - Hybrid Retrieval
retrieval/retriever.py - Reranker Stub
retrieval/reranker.py - Grounding Prompt
rag/prompt.py - Claude API
Evaluation
- RAGAS Evaluation
eval/run_ragas.py
Other components
- Questioner
- OpenAI API
Connections 20
- StratGG Scraper → Typed Chunking: supplies records
README.md - STS2 Wiki Scraper → Typed Chunking: supplies records
README.md - Patch Scraper → Typed Chunking: supplies records
README.md - Typed Chunking → Chunk Metadata: creates chunk IDs
pipeline/chunker.py - Typed Chunking → Chroma Indexing: writes chunk corpus
README.md - Chroma Indexing → Text Embeddings: embeds chunks
pipeline/indexer.py - Text Embeddings → OpenAI API: requests vectors
pipeline/embedder.py - Chroma Indexing → Chroma Store: upserts vectors
pipeline/indexer.py - Questioner → Streamlit UI: asks question
README.md - Streamlit UI → RAG Orchestrator: submits question
ui/app.py - Streamlit UI → Chroma Indexing: triggers reindex
ui/app.py - RAG Orchestrator → Hybrid Retrieval: retrieves chunks
rag/pipeline.py - Hybrid Retrieval → Text Embeddings: embeds query
retrieval/retriever.py - Hybrid Retrieval → Chroma Store: dense search
retrieval/retriever.py - Hybrid Retrieval → Reranker Stub: ranks candidates
retrieval/retriever.py - RAG Orchestrator → Grounding Prompt: builds context
rag/pipeline.py - RAG Orchestrator → Claude API: requests answer
README.md - RAG Orchestrator → Claude API: expands query
rag/pipeline.py - RAGAS Evaluation → RAG Orchestrator: evaluates answers
eval/run_ragas.py - RAGAS Evaluation → OpenAI API: scores responses
eval/run_ragas.py