rag_executeWorkflow_ivsm
Execute a RAG workflow to process user questions by generating context-aware answers from document embeddings using IVSM functions. Facilitates semantic search and top-k result retrieval for precise responses.
Instructions
Execute complete RAG workflow to answer user questions based on document context.
This function handles the entire RAG pipeline using IVSM functions:
- Configuration setup (using configurable values from rag_config.yml)
- Store user query (with /rag prefix stripping)
- Tokenize query using ivsm.tokenizer_encode
- Create embedding view using ivsm.IVSM_score
- Convert embeddings to vector columns using ivsm.vector_to_columns
- Perform semantic search against chunk embeddings
The function uses configuration values from rag_config.yml with fallback defaults.
Arguments: question - user question to process k - number of top-k results to return (optional, uses config default if not provided
Returns: Returns the top-k most relevant chunks with metadata for context-grounded answer generation.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
k | No | ||
question | Yes |