| name | rag-query |
| description | Query a RAG (Retrieval-Augmented Generation) knowledge base to find relevant information from ingested documents. This skill should be used when the user wants to search within a loaded knowledge base or document collection. |
RAG Query
Query the RAG knowledge base for semantically relevant documents.
Usage
python scripts/rag_query.py "<query>" [top_k]
Parameters
| Parameter | Type | Required | Description |
|---|
| query | string | Yes | The search query |
| top_k | int | No | Number of results to return (default: 3) |
Behavior
- Uses semantic similarity search against the FAISS vector store
- Returns matching document chunks with relevance scores
- Returns a message indicating the knowledge base is not initialized if no retriever is available
- Documents must be ingested first using the RAG pipeline
Notes
- The knowledge base must be loaded before querying
- Use the RAG retriever to ingest documents before running queries
- Embedding model: DashScope text-embedding-v3