retrieve_with_rag
Retrieves relevant passages from a long document or text using RAG, enabling targeted search without loading full content. Provide a query and a file path or text to get matching sections.
Instructions
Retrieves relevant passages from a document or string based on a query using RAG.
Exactly one of context_path or context_text must be provided. Do NOT provide both.
Args:
context_path (str): The path to the context file.
context_text (str): The text content to search.
query (str): The query to search for.
Returns:
str: A string containing the relevant passages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| context_path | No | ||
| context_text | No |