Semantic Search & RAG Instructions
- Load document strings and clean HTML/markdown syntax.
- Chunk text using recursive character splitting (target chunk size: 500, overlap: 50).
- Compute embeddings using model API.
- Insert chunks and embeddings into local vector store (e.g. Chroma, FAISS).
- For queries, embed query string and retrieve top 3 nearest chunks.
- Format prompt template: Context + Query -> Answer.