Skip to main content

rag_query

Method
This is a method of the Agent class in the agent module.
Query knowledge using RAG pipeline with citations. This is the recommended way to get answers with citations from an agent’s knowledge.

Signature

Parameters

question
str
required
The question to answer **kwargs: Additional arguments passed to RAG.query()

Returns

Returns
'RAGResult'
RAGResult with answer, citations, context_used, and metadata

Exceptions

If no knowledge sources are configured
If RAG module is not available

Usage

Uses

  • ValueError
  • ImportError
  • kwargs.setdefault
  • query

Source

View on GitHub

praisonaiagents/agent/agent.py at line 3131

RAG Concept

RAG Overview

Chunking Strategies