-
-
Notifications
You must be signed in to change notification settings - Fork 740
feat: Add Agentic RAG Tools Implementation #1085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add Agentic RAG Tools Implementation #1085
Conversation
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds two example RAG agents: a CLI Thai-recipes RAG agent that enforces OPENAI_API_KEY and runs an interactive loop calling Agent.start(), and a Streamlit βAgentic RAG with GPT-5β example (README + app) providing a UI for querying a vector-backed knowledge source (app contains a syntax error). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant CLI as rag_agent.py (CLI)
participant A as Agent (gpt-4o)
participant KB as PDF KB
participant W as Internet Search (optional)
CLI->>CLI: Check OPENAI_API_KEY
alt missing key
CLI-->>U: Abort with guidance
else key present
CLI-->>U: Welcome & prompt
loop interaction
U->>CLI: query
alt exit command
CLI-->>U: Goodbye
CLI->>CLI: Terminate
else regular query
CLI->>A: start(query)
par retrieval
A->>KB: retrieve context
KB-->>A: context
and optional web
A->>W: internet_search(query)
W-->>A: results
end
A-->>CLI: response (markdown)
CLI-->>U: Print response
end
end
end
sequenceDiagram
autonumber
participant U as User (browser)
participant UI as Streamlit app
participant AG as Agent (GPTβ5)
participant DB as Vector DB (Chroma-like)
participant Src as External URL sources
U->>UI: open app / submit query
UI->>UI: show sidebar (API key, sources)
alt new source added
UI->>Src: fetch & ingest
UI->>DB: index vectors
UI->>AG: reinitialize agent (cached reset)
end
U->>UI: submit question
UI->>AG: agent.start(question)
AG->>DB: vector search
DB-->>AG: context
AG-->>UI: response (streamed/markdown)
UI-->>U: render response
Estimated code review effortπ― 3 (Moderate) | β±οΈ ~25 minutes Possibly related PRs
Poem
Tip π Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. β¨ Finishing Touches
π§ͺ Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @Dhivya-Bharathy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request adds a new agentic Retrieval-Augmented Generation (RAG) implementation to the Python tools. The primary goal is to provide a functional example of an AI agent that specializes in Thai cuisine. This agent can answer questions by drawing from a specific PDF knowledge base and by performing web searches, all facilitated by the PraisonAI framework. The changes introduce a self-contained Python script that sets up and runs this specialized conversational agent, complete with an interactive command-line interface for user interaction.
Highlights
- Specialized RAG Agent: Introduces a new AI agent specialized in Thai recipes and cooking, leveraging a dedicated knowledge base.
- Web Search Integration: The agent is equipped with web search capabilities to fetch additional and up-to-date information.
- PDF Knowledge Base: Utilizes a PDF document as a knowledge base, allowing the agent to provide detailed information from specific sources.
- Interactive Chat Interface: The implementation includes an interactive command-line interface for users to converse with the agent.
- PraisonAI Framework Usage: The entire agent is built using the PraisonAI framework, demonstrating its application for creating intelligent agents.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with π and π on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. β©
PR Reviewer Guide πHere are some key observations to aid the review process:
|
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1085 +/- ##
========================================
Coverage 14.23% 14.24%
========================================
Files 25 25
Lines 2571 2717 +146
Branches 367 389 +22
========================================
+ Hits 366 387 +21
- Misses 2189 2314 +125
Partials 16 16
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. π New features to boost your workflow:
|
PR Code Suggestions β¨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new example for a RAG agent with web search capabilities. The implementation is a good starting point, but there are several areas for improvement to make it more robust and to ensure it correctly demonstrates the intended RAG and tool-using functionalities. My review includes critical feedback on enabling the web search tool, a high-priority suggestion to implement RAG correctly, and medium-priority suggestions for improving error handling and script initialization.
@@ -0,0 +1,44 @@ | |||
from praisonaiagents import Agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verbose=True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The agent's instructions on line 23 mention using internet_search
, but this tool is not provided to the agent during initialization. You need to pass it in the tools
parameter for the agent to be able to perform web searches.
verbose=True | |
) | |
verbose=True, | |
tools=[Tools.internet_search] | |
) |
rag_agent = Agent( | ||
instructions="""You are a helpful AI assistant specialized in Thai recipes and cooking. | ||
|
||
You have access to a PDF knowledge base about Thai recipes from: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf | ||
|
||
You can also search the web for additional information about Thai cooking, ingredients, and techniques. | ||
|
||
When answering questions: | ||
1. Use your knowledge about Thai cuisine to provide helpful information | ||
2. If needed, search the web for additional details, current information, or clarification | ||
3. Provide comprehensive, helpful answers about Thai cuisine | ||
4. Always be informative and helpful about Thai cooking! | ||
|
||
You can use the internet_search function to search the web when needed.""", | ||
llm="gpt-4o", | ||
markdown=True, | ||
verbose=True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example is presented as a RAG agent, but it doesn't use the framework's RAG capabilities effectively. The PDF URL is only mentioned in the instructions, which doesn't guarantee the agent can access and retrieve information from it. To make this a true RAG example, you should use the knowledge
parameter of the Agent
. Since the framework may not support URLs directly, you can download the PDF and provide the local path. This will ensure the agent properly ingests the document into its knowledge base.
Here's a suggestion on how to modify the code to implement this. You would need to add import requests
and import sys
at the top of the file.
# Download the knowledge base if it doesn't exist
pdf_url = "https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"
pdf_path = "ThaiRecipes.pdf"
if not os.path.exists(pdf_path):
print(f"Downloading knowledge base from {pdf_url}...")
try:
response = requests.get(pdf_url, timeout=30)
response.raise_for_status()
with open(pdf_path, "wb") as f:
f.write(response.content)
print("Download complete.")
except requests.RequestException as e:
print(f"Error downloading knowledge base: {e}", file=sys.stderr)
sys.exit(1)
# Create the RAG agent with web search capabilities
rag_agent = Agent(
instructions="""You are a helpful AI assistant specialized in Thai recipes and cooking.
You have access to a PDF knowledge base about Thai recipes.
You can also search the web for additional information about Thai cooking, ingredients, and techniques.
When answering questions:
1. Use your knowledge about Thai cuisine to provide helpful information
2. If needed, search the web for additional details, current information, or clarification
3. Provide comprehensive, helpful answers about Thai cuisine
4. Always be informative and helpful about Thai cooking!
You can use the internet_search function to search the web when needed.""",
knowledge=[pdf_path],
llm="gpt-4o",
markdown=True,
verbose=True,
tools=[Tools.internet_search]
)
if not os.getenv("OPENAI_API_KEY"): | ||
print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'") | ||
exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better practice in command-line applications, it's recommended to print error messages to standard error (stderr
) and use sys.exit()
for termination. This separates normal output from error messages. You'll need to import sys
at the top of the file.
if not os.getenv("OPENAI_API_KEY"): | |
print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'") | |
exit(1) | |
if not os.getenv("OPENAI_API_KEY"): | |
import sys | |
print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'", file=sys.stderr) | |
sys.exit(1) |
response = rag_agent.start(user_input) | ||
print(f"\nπ€ Assistant: {response}\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rag_agent.start()
method can return None
if an error occurs during generation. The current code would print "Assistant: None". It's better to handle this case explicitly for a more user-friendly experience.
response = rag_agent.start(user_input) | |
print(f"\nπ€ Assistant: {response}\n") | |
response = rag_agent.start(user_input) | |
if response: | |
print(f"\nπ€ Assistant: {response}\n") | |
else: | |
print("\nπ€ Assistant: I could not generate a response.\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
π§Ή Nitpick comments (2)
examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py (2)
1-2
: Add sys import to support clean process termination.Apply:
from praisonaiagents import Agent import os +import sys
34-44
: Harden the CLI loop (Ctrl+C/EOF, empty input).Apply:
- while True: - user_input = input("You: ") - if user_input.lower() in ['quit', 'exit', 'bye']: - print("π Goodbye! Happy cooking!") - break - - try: - response = rag_agent.start(user_input) - print(f"\nπ€ Assistant: {response}\n") - except Exception as e: - print(f"β Error: {e}\n") + while True: + try: + user_input = input("You: ").strip() + except (EOFError, KeyboardInterrupt): + print("\nπ Goodbye! Happy cooking!") + break + if not user_input: + continue + if user_input.lower() in ['quit', 'exit', 'bye']: + print("π Goodbye! Happy cooking!") + break + try: + response = rag_agent.start(user_input) + print(f"\nπ€ Assistant: {response}\n") + except Exception as e: + print(f"β Error: {e}\n")
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (1)
examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py
(1 hunks)
π§° Additional context used
𧬠Code graph analysis (1)
examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py (2)
src/praisonai-agents/praisonaiagents/knowledge/knowledge.py (1)
markdown
(167-168)src/praisonai-agents/praisonaiagents/llm/llm.py (1)
response
(1715-1820)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test-core (3.11)
- GitHub Check: Run tests and collect coverage
- GitHub Check: quick-test
π Additional comments (1)
examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py (1)
41-41
: Agent.start is available and returns a string
The PythonAgent
class (praisonaiagents/agent/agent.py) definesstart(self, prompt: str, **kwargs)
(aliasrun()
) that wrapschat()
and returns its output as astr
. Example usage is correct.
@@ -0,0 +1,44 @@ | |||
from praisonaiagents import Agent | |||
import os | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wire an actual web search tool; the referenced internet_search function doesnβt exist.
Instructions tell the model to use internet_search, but no tool is registered. Add a minimal DuckDuckGo tool with defensive imports.
Apply:
+
+def internet_search(query: str) -> str:
+ """
+ Lightweight DuckDuckGo search tool for the Agent.
+ Returns a short bulleted list of top results (title, url, snippet).
+ """
+ try:
+ from duckduckgo_search import DDGS # pip install duckduckgo-search
+ except Exception as import_err:
+ return f"Search tool unavailable: {import_err}"
+ try:
+ with DDGS(timeout=10) as ddgs:
+ results = list(ddgs.text(query, max_results=5))
+ lines = []
+ for r in results:
+ title = r.get("title") or r.get("h") or "Untitled"
+ url = r.get("href") or r.get("u") or ""
+ body = r.get("body") or r.get("a") or ""
+ lines.append(f"- {title} β {url}\n {body}")
+ return "\n".join(lines) if lines else "No results found."
+ except Exception as e:
+ return f"Search error: {e}"
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Insert near the top of examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py | |
def internet_search(query: str) -> str: | |
""" | |
Lightweight DuckDuckGo search tool for the Agent. | |
Returns a short bulleted list of top results (title, url, snippet). | |
""" | |
try: | |
from duckduckgo_search import DDGS # pip install duckduckgo-search | |
except Exception as import_err: | |
return f"Search tool unavailable: {import_err}" | |
try: | |
with DDGS(timeout=10) as ddgs: | |
results = list(ddgs.text(query, max_results=5)) | |
lines = [] | |
for r in results: | |
title = r.get("title") or r.get("h") or "Untitled" | |
url = r.get("href") or r.get("u") or "" | |
body = r.get("body") or r.get("a") or "" | |
lines.append(f"- {title} β {url}\n {body}") | |
return "\n".join(lines) if lines else "No results found." | |
except Exception as e: | |
return f"Search error: {e}" |
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py around
line 3, the agent references an internet_search tool that doesn't exist; add a
minimal DuckDuckGo web search tool and register it instead. Import requests
defensively (try/except ImportError and raise a clear RuntimeError or fallback
stub), implement a small function that takes a query string, performs a
DuckDuckGo search (HTTP GET to the simple HTML search endpoint or API) with
timeout and error handling, parses results to return a short list or text
summary, and then register this function under the expected tool name (e.g.,
"internet_search" or update instructions to use the new tool name). Ensure
network timeouts, exceptions are caught and meaningful errors returned so the
agent remains robust.
# Set OpenAI API key if not already set | ||
if not os.getenv("OPENAI_API_KEY"): | ||
print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'") | ||
exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not exit at import time; move API key check into main and use sys.exit.
Top-level exit breaks imports/tests and is brittle. Validate the key inside the main block and call sys.exit(1).
Apply this diff to remove the top-level check (see a follow-up comment for adding it inside main):
-# Set OpenAI API key if not already set
-if not os.getenv("OPENAI_API_KEY"):
- print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'")
- exit(1)
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
# Set OpenAI API key if not already set | |
if not os.getenv("OPENAI_API_KEY"): | |
print("Please set your OpenAI API key: export OPENAI_API_KEY='your-api-key-here'") | |
exit(1) |
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py around
lines 4 to 7, remove the top-level OPENAI_API_KEY check and exit call so
imports/tests aren't terminated during module import; instead, add the
environment key validation inside the if __name__ == "__main__": main() flow (or
at start of main()), and when the key is missing call sys.exit(1) after printing
the message. Ensure you import sys in the module if not already present.
rag_agent = Agent( | ||
instructions="""You are a helpful AI assistant specialized in Thai recipes and cooking. | ||
|
||
You have access to a PDF knowledge base about Thai recipes from: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf | ||
|
||
You can also search the web for additional information about Thai cooking, ingredients, and techniques. | ||
|
||
When answering questions: | ||
1. Use your knowledge about Thai cuisine to provide helpful information | ||
2. If needed, search the web for additional details, current information, or clarification | ||
3. Provide comprehensive, helpful answers about Thai cuisine | ||
4. Always be informative and helpful about Thai cooking! | ||
|
||
You can use the internet_search function to search the web when needed.""", | ||
llm="gpt-4o", | ||
markdown=True, | ||
verbose=True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Register the search tool with the Agent; otherwise the LLM canβt call it.
Apply:
rag_agent = Agent(
@@
- llm="gpt-4o",
+ llm="gpt-4o",
+ tools=[internet_search],
markdown=True,
verbose=True
)
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
rag_agent = Agent( | |
instructions="""You are a helpful AI assistant specialized in Thai recipes and cooking. | |
You have access to a PDF knowledge base about Thai recipes from: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf | |
You can also search the web for additional information about Thai cooking, ingredients, and techniques. | |
When answering questions: | |
1. Use your knowledge about Thai cuisine to provide helpful information | |
2. If needed, search the web for additional details, current information, or clarification | |
3. Provide comprehensive, helpful answers about Thai cuisine | |
4. Always be informative and helpful about Thai cooking! | |
You can use the internet_search function to search the web when needed.""", | |
llm="gpt-4o", | |
markdown=True, | |
verbose=True | |
) | |
rag_agent = Agent( | |
instructions="""You are a helpful AI assistant specialized in Thai recipes and cooking. | |
You have access to a PDF knowledge base about Thai recipes from: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf | |
You can also search the web for additional information about Thai cooking, ingredients, and techniques. | |
When answering questions: | |
1. Use your knowledge about Thai cuisine to provide helpful information | |
2. If needed, search the web for additional details, current information, or clarification | |
3. Provide comprehensive, helpful answers about Thai cuisine | |
4. Always be informative and helpful about Thai cooking! | |
You can use the internet_search function to search the web when needed.""", | |
llm="gpt-4o", | |
tools=[internet_search], | |
markdown=True, | |
verbose=True | |
) |
You have access to a PDF knowledge base about Thai recipes from: https://phi-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf | ||
|
||
You can also search the web for additional information about Thai cooking, ingredients, and techniques. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
PDF βknowledge baseβ is only mentioned in the prompt; no retrieval/RAG is wired.
If the goal is Agentic RAG, connect an actual knowledge component (e.g., vector store over ThaiRecipes.pdf) instead of relying solely on instructions. Otherwise, reword the prompt to avoid overstating capabilities.
I can help integrate the libraryβs knowledge/RAG API once confirmed. To locate the supported API surface in this repo, run:
π Script executed:
#!/bin/bash
# Locate Knowledge APIs and Agent constructor to see how to pass knowledge.
rg -nP -C2 'class\s+Knowledge\b|def\s+(from_pdfs|from_pdf|add_pdf|add_document|add_documents)\b' src
rg -nP -C3 'class\s+Agent\b|def\s+__init__\(' src
Length of output: 55975
π Script executed:
#!/bin/bash
# Locate the Agentic RAG example file
find examples -type f -name 'rag_agent.py'
# Display the first 50 lines to inspect retrieval wiring
sed -n '1,50p' examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py
Length of output: 1840
Wire actual PDF retrieval or remove PDF reference
The prompt asserts access to a ThaiRecipes.pdf βknowledge base,β but rag_agent.py never instantiates or passes a Knowledge/memory component. Either load the PDF (e.g. via Knowledge.from_pdfs
or add_pdf
) and pass it into Agent(..., memory=True, memory_config=...)
, or remove the PDF mention from the instructions to avoid overstating capabilities.
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py around
lines 13 to 15, the prompt claims access to ThaiRecipes.pdf but the file never
instantiates or wires a Knowledge/memory component; either load the PDF into the
agent (e.g., call Knowledge.from_pdfs([...]) or use agent.memory.add_pdf(...)
and create a memory/memory_config object, then pass memory=True and
memory_config=<your_config> (or memory=<memory_instance>) into the Agent
constructor, or remove the PDF reference from the prompt so the instructions
don't claim an unavailable knowledge source.
if __name__ == "__main__": | ||
print("π€ Thai Recipe RAG Agent is ready!") | ||
print("Ask me anything about Thai recipes or cooking!") | ||
print("Type 'quit' to exit.\n") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Validate OPENAI_API_KEY inside main and fix the exit message list.
Apply:
if __name__ == "__main__":
- print("π€ Thai Recipe RAG Agent is ready!")
- print("Ask me anything about Thai recipes or cooking!")
- print("Type 'quit' to exit.\n")
+ # Validate key at runtime (avoid exiting on import)
+ if not os.getenv("OPENAI_API_KEY"):
+ print("Please set your OpenAI API key first, e.g.:")
+ print(" export OPENAI_API_KEY='your-api-key-here'")
+ sys.exit(1)
+ print("π€ Thai Recipe RAG Agent is ready!")
+ print("Ask me anything about Thai recipes or cooking!")
+ print("Type 'quit', 'exit', or 'bye' to exit.\n")
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if __name__ == "__main__": | |
print("π€ Thai Recipe RAG Agent is ready!") | |
print("Ask me anything about Thai recipes or cooking!") | |
print("Type 'quit' to exit.\n") | |
if __name__ == "__main__": | |
# Validate key at runtime (avoid exiting on import) | |
if not os.getenv("OPENAI_API_KEY"): | |
print("Please set your OpenAI API key first, e.g.:") | |
print(" export OPENAI_API_KEY='your-api-key-here'") | |
sys.exit(1) | |
print("π€ Thai Recipe RAG Agent is ready!") | |
print("Ask me anything about Thai recipes or cooking!") | |
print("Type 'quit', 'exit', or 'bye' to exit.\n") |
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py around
lines 29-33, add a runtime validation inside the main block to check that the
OPENAI_API_KEY environment variable is present and non-empty, and if missing
print a clear error and exit with a non-zero status; also replace the single
exit-message print with a corrected exit command list (e.g., show both "quit"
and "exit" or print a list of accepted exit keywords) or build the message from
that list so users know all valid ways to quit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
π§Ή Nitpick comments (5)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md (3)
38-40
: Add languages to fenced code blocks (markdownlint MD040).- ``` + ```ini OPENAI_API_KEY=your-api-key-here ```-``` +```text streamlit>=1.28.0 praisonaiagents>=0.1.0 openai>=1.0.0 python-dotenv>=1.0.0Also applies to: 115-120 --- `132-132`: **Use headings instead of bold text for section titles (MD036).** ```diff -**Knowledge base not loading** +### Knowledge base not loading
-**Agent initialization errors** +### Agent initialization errors-**Built with β€οΈ using PraisonAI Agents and GPT-5** +### Built with β€οΈ using PraisonAI Agents and GPT-5Also applies to: 137-137, 154-154
117-117
: Version inconsistency for praisonaiagents.Dependencies specify praisonaiagents>=0.1.0, but the footer references v0.0.157. Align to avoid user confusion.
-β οΈ **Current Status**: Knowledge base functionality is temporarily disabled due to compatibility issues with the current version of PraisonAI Agents (v0.0.157). +β οΈ **Current Status**: Knowledge base functionality is temporarily disabled due to compatibility issues with the current praisonaiagents version.Optionally pin in requirements (README and requirements.txt) to a known-good version once validated.
Also applies to: 176-176
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py (2)
60-77
: Remove unused _knowledge parameter or actually use it for caching semantics.Right now itβs unused by Agent; passing a list also increases cache churn when order changes.
Option A (remove until re-enabled):
- def load_agent(_knowledge: list) -> Agent: + def load_agent() -> Agent: """Create an agent with reasoning capabilities""" # Note: Temporarily removed knowledge parameter to avoid rerank error # TODO: Re-enable when PraisonAI Agents knowledge issue is resolved return Agent( name="Knowledge Agent", instructions=[ "You are a helpful AI assistant. Answer questions based on your general knowledge.", "Provide clear, well-structured answers in markdown format.", "Use proper markdown formatting with headers, lists, and emphasis where appropriate.", "Structure your response with clear sections and bullet points when helpful.", ], - llm="gpt-5-nano", + llm="gpt-4o-mini", markdown=True, verbose=True )And update call sites:
- agent = load_agent(knowledge) + agent = load_agent()Option B (keep for cache keying but stabilize it):
- def load_agent(_knowledge: list) -> Agent: + def load_agent(_knowledge_fingerprint: tuple[str, ...]) -> Agent:and call with:
- agent = load_agent(knowledge) + agent = load_agent(tuple(knowledge))
88-97
: Adding URLs path is disabled but mutation still occurs; guard against None and duplicates.When re-enabled, validate URLs and deduplicate to keep cache keys stable.
- if hasattr(st.session_state, 'urls_to_add') and st.session_state.urls_to_add: + if hasattr(st.session_state, 'urls_to_add') and st.session_state.urls_to_add: with st.spinner("π₯ Loading new documents..."): - knowledge.append(st.session_state.urls_to_add) + url = st.session_state.urls_to_add.strip() + if url and url not in knowledge: + knowledge.append(url) # Reinitialize agent with new knowledge - agent = load_agent(knowledge) + agent = load_agent(tuple(knowledge))
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (2)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md
(1 hunks)examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
(1 hunks)
π§° Additional context used
𧬠Code graph analysis (1)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py (2)
src/praisonai-agents/praisonaiagents/knowledge/knowledge.py (1)
markdown
(167-168)src/praisonai-agents/praisonaiagents/llm/llm.py (1)
response
(1715-1820)
πͺ Ruff (0.12.2)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
73-73: SyntaxError: missing closing quote in string literal
πͺ LanguageTool
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md
[grammar] ~1-~1: There might be a mistake here.
Context: # π§ Agentic RAG with GPT-5 An agentic RAG application built with th...
(QB_NEW_EN)
[grammar] ~7-~7: There might be a mistake here.
Context: ...t OpenAI model for intelligent responses - ποΈ Built-in Vector Search: ChromaDB i...
(QB_NEW_EN)
[grammar] ~8-~8: There might be a mistake here.
Context: ...B integration for fast similarity search - π Agentic RAG: Intelligent retrieval ...
(QB_NEW_EN)
[grammar] ~9-~9: There might be a mistake here.
Context: ...telligent retrieval augmented generation - π Markdown Formatting: Beautiful, str...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ...tting**: Beautiful, structured responses - π Dynamic Knowledge: Add URLs to expa...
(QB_NEW_EN)
[grammar] ~11-~11: There might be a mistake here.
Context: ...dge**: Add URLs to expand knowledge base - β‘ Real-time Responses: Fast answer gen...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ...time Responses**: Fast answer generation- π― Clean Interface: Simplified UI wit...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ...fied UI without configuration complexity ## π Quick Start ### Prerequisites - Pyt...
(QB_NEW_EN)
[grammar] ~14-~14: There might be a mistake here.
Context: ...figuration complexity ## π Quick Start ### Prerequisites - Python 3.11+ - OpenAI A...
(QB_NEW_EN)
[grammar] ~18-~18: There might be a mistake here.
Context: ...Start ### Prerequisites - Python 3.11+ - OpenAI API key with GPT-5 access ### In...
(QB_NEW_EN)
[grammar] ~47-~47: There might be a mistake here.
Context: ...tic_rag_gpt5.py ``` ## π― How to Use 1. Enter your OpenAI API key in the sideb...
(QB_NEW_EN)
[grammar] ~60-~60: There might be a mistake here.
Context: ...uilding RAG systems ## ποΈ Architecture ### Core Components - Agent
: PraisonA...
(QB_NEW_EN)
[grammar] ~64-~64: There might be a mistake here.
Context: ...nAI Agents framework for intelligent Q&A - knowledge
: Built-in knowledge base that handles U...
(QB_NEW_EN)
[grammar] ~65-~65: There might be a mistake here.
Context: ...dge base that handles URLs and documents - llm
: OpenAI GPT-5-nano for generating respo...
(QB_NEW_EN)
[grammar] ~66-~66: There might be a mistake here.
Context: ...enAI GPT-5-nano for generating responses - Built-in Vector Search: Automatic simi...
(QB_NEW_EN)
[grammar] ~76-~76: There might be a mistake here.
Context: ...formatted responses ## π§ Configuration ### Database Settings - Vector DB: Built...
(QB_NEW_EN)
[grammar] ~78-~78: There might be a mistake here.
Context: ... π§ Configuration ### Database Settings - Vector DB: Built-in vector database wi...
(QB_NEW_EN)
[grammar] ~79-~79: There might be a mistake here.
Context: ... vector database with automatic indexing - Storage: Local storage managed by Prai...
(QB_NEW_EN)
[grammar] ~80-~80: There might be a mistake here.
Context: ...ocal storage managed by PraisonAI Agents - Search: Automatic similarity search #...
(QB_NEW_EN)
[grammar] ~83-~83: There might be a mistake here.
Context: ...milarity search ### Model Configuration - LLM: OpenAI GPT-5-nano - *Embeddings...
(QB_NEW_EN)
[grammar] ~84-~84: There might be a mistake here.
Context: ...nfiguration - LLM: OpenAI GPT-5-nano - Embeddings: Automatic handling by Prai...
(QB_NEW_EN)
[grammar] ~85-~85: There might be a mistake here.
Context: ...: Automatic handling by PraisonAI Agents - Vector Store: Built-in with automatic ...
(QB_NEW_EN)
[grammar] ~88-~88: There might be a mistake here.
Context: ...t processing ## π Knowledge Management ### Adding Sources - Use the sidebar to add ...
(QB_NEW_EN)
[grammar] ~90-~90: There might be a mistake here.
Context: ...Knowledge Management ### Adding Sources - Use the sidebar to add new URLs - Source...
(QB_NEW_EN)
[grammar] ~93-~93: There might be a mistake here.
Context: ...indexed - Current sources are displayed as numbered list ### Default Knowledge - ...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ... as numbered list ### Default Knowledge - Starts with PraisonAI documentation: `ht...
(QB_NEW_EN)
[grammar] ~96-~96: There might be a mistake here.
Context: ... - Starts with PraisonAI documentation: https://docs.praisonai.com/introduction/agents.md
- Expandable with any web-based documentat...
(QB_NEW_EN)
[grammar] ~99-~99: There might be a mistake here.
Context: ...b-based documentation ## π¨ UI Features ### Sidebar - API Key Management: Secure...
(QB_NEW_EN)
[grammar] ~101-~101: There might be a mistake here.
Context: ...entation ## π¨ UI Features ### Sidebar - API Key Management: Secure input for O...
(QB_NEW_EN)
[grammar] ~102-~102: There might be a mistake here.
Context: ...t**: Secure input for OpenAI credentials - URL Addition: Dynamic knowledge base e...
(QB_NEW_EN)
[grammar] ~103-~103: There might be a mistake here.
Context: ...tion**: Dynamic knowledge base expansion - Current Sources: Numbered list of load...
(QB_NEW_EN)
[grammar] ~106-~106: There might be a mistake here.
Context: ... list of loaded URLs ### Main Interface - Suggested Prompts: Quick access to com...
(QB_NEW_EN)
[grammar] ~107-~107: There might be a mistake here.
Context: ...mpts**: Quick access to common questions - Query Input: Large text area for custo...
(QB_NEW_EN)
[grammar] ~108-~108: There might be a mistake here.
Context: ...**: Large text area for custom questions - Fast Responses: Quick answer generatio...
(QB_NEW_EN)
[grammar] ~109-~109: There might be a mistake here.
Context: ...ast Responses**: Quick answer generation - Markdown Rendering: Beautiful formatte...
(QB_NEW_EN)
[grammar] ~112-~112: There might be a mistake here.
Context: ...tted responses ## π οΈ Technical Details ### Dependencies ``` streamlit>=1.28.0 prais...
(QB_NEW_EN)
[grammar] ~122-~122: There might be a mistake here.
Context: ...thon-dotenv>=1.0.0 ``` ### Key Features - Built-in Knowledge Base: Automatic doc...
(QB_NEW_EN)
[grammar] ~123-~123: There might be a mistake here.
Context: ...tomatic document processing and indexing - Vector Search: Efficient similarity se...
(QB_NEW_EN)
[grammar] ~124-~124: There might be a mistake here.
Context: ...similarity search with built-in database - Caching: Efficient resource loading wi...
(QB_NEW_EN)
[grammar] ~125-~125: There might be a mistake here.
Context: ... resource loading with Streamlit caching - Error Handling: Graceful handling of A...
(QB_NEW_EN)
[grammar] ~128-~128: There might be a mistake here.
Context: ...processing errors ## π Troubleshooting ### Common Issues **Knowledge base not load...
(QB_NEW_EN)
[grammar] ~142-~142: There might be a mistake here.
Context: ...n version is 3.11+ ### Performance Tips - Cache Resources: Knowledge base and ag...
(QB_NEW_EN)
[grammar] ~147-~147: There might be a mistake here.
Context: ...for optimal performance ## π― Use Cases - Documentation Q&A: Ask questions about...
(QB_NEW_EN)
πͺ markdownlint-cli2 (0.17.2)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md
38-38: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
115-115: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
132-132: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
137-137: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
154-154: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: quick-test
- GitHub Check: test-core (3.11)
- GitHub Check: Run tests and collect coverage
π Additional comments (1)
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md (1)
1-1
: GPT-5/gpt-5-nano availability verified; align naming
OpenAI now supportsgpt-5
,gpt-5-mini
, andgpt-5-nano
as API models (openai.com, docs.litellm.ai). Update the README so every reference consistently uses these exact model names.
# Check if API key is provided | ||
if openai_key: | ||
# Initialize knowledge base (cached to avoid reloading) | ||
@st.cache_resource(show_spinner="π Loading knowledge base...") | ||
def load_knowledge() -> list: | ||
"""Load and initialize the knowledge base with default URL""" | ||
return ["https://docs.praisonai.com/introduction/agents.md"] # Default URL | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API key entered in the UI is never used. Set OPENAI_API_KEY before initializing cached resources.
Without exporting the key, Agent.start() will fail when litellm looks up credentials.
if openai_key:
+ # Make the UI-provided key available to downstream libs
+ if openai_key and os.getenv("OPENAI_API_KEY") != openai_key:
+ os.environ["OPENAI_API_KEY"] = openai_key
Also applies to: 78-81
llm="gpt-5-nano | ||
markdown=True, | ||
verbose=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Syntax error: missing closing quote on llm string literal.
This prevents the app from running.
Apply:
- llm="gpt-5-nano
+ llm="gpt-5-nano",
If βgpt-5-nanoβ isnβt available to users, prefer a broadly-available model and keep the comma:
- llm="gpt-5-nano",
+ llm="gpt-4o-mini",
π Script executed:
#!/bin/bash
sed -n '60,90p' examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
Length of output: 1473
Fix missing closing quote on llm
parameter
Add the missing quote and trailing comma to prevent a syntax error:
File: examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
@@ return Agent(
- llm="gpt-5-nano
+ llm="gpt-5-nano",
If βgpt-5-nanoβ isnβt available, swap in a broadly supported model instead:
- llm="gpt-5-nano",
+ llm="gpt-4o-mini",
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
llm="gpt-5-nano | |
markdown=True, | |
verbose=True | |
llm="gpt-5-nano", | |
markdown=True, | |
verbose=True |
π§° Tools
πͺ Ruff (0.12.2)
73-73: SyntaxError: missing closing quote in string literal
π€ Prompt for AI Agents
In
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
around lines 73 to 75, the llm parameter value is missing a closing quote and
trailing comma causing a syntax error; fix by adding the closing quotation mark
after "gpt-5-nano" and a comma so the parameter reads as a proper string
argument, and if "gpt-5-nano" is unavailable replace it with a supported model
name (e.g., "gpt-4o-mini") while keeping the same quoting and comma.
answer_placeholder.markdown( | ||
response, | ||
unsafe_allow_html=True | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Avoid unsafe_allow_html=True unless you sanitize model output.
Even though Streamlit sanitizes scripts, enabling raw HTML opens room for unwanted rendering. Use markdown=True in Agent and render with default st.markdown.
- answer_placeholder.markdown(
- response,
- unsafe_allow_html=True
- )
+ answer_placeholder.markdown(response)
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
answer_placeholder.markdown( | |
response, | |
unsafe_allow_html=True | |
) | |
answer_placeholder.markdown(response) |
π€ Prompt for AI Agents
In
examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/agentic_rag_gpt5.py
around lines 136 to 139, remove the use of st.markdown(...,
unsafe_allow_html=True) and instead render the agent response with the default
st.markdown (no unsafe_allow_html), and ensure the Agent is configured to return
Markdown-safe output (set markdown=True or otherwise produce plain Markdown) or
sanitize/escape any HTML from the model before rendering; if raw HTML output is
required, explicitly sanitize it first.
- **π Agentic RAG**: Intelligent retrieval augmented generation | ||
- **π Markdown Formatting**: Beautiful, structured responses | ||
- **π Dynamic Knowledge**: Add URLs to expand knowledge base | ||
- **β‘ Real-time Responses**: Fast answer generation- **π― Clean Interface**: Simplified UI without configuration complexity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix merged list items (βReal-time Responsesβ + βClean Interfaceβ).
The two bullets are concatenated, breaking formatting.
Apply:
-- **β‘ Real-time Responses**: Fast answer generation- **π― Clean Interface**: Simplified UI without configuration complexity
+- **β‘ Real-time Responses**: Fast answer generation
+- **π― Clean Interface**: Simplified UI without configuration complexity
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- **β‘ Real-time Responses**: Fast answer generation- **π― Clean Interface**: Simplified UI without configuration complexity | |
- **β‘ Real-time Responses**: Fast answer generation | |
- **π― Clean Interface**: Simplified UI without configuration complexity |
π§° Tools
πͺ LanguageTool
[grammar] ~12-~12: There might be a mistake here.
Context: ...time Responses**: Fast answer generation- π― Clean Interface: Simplified UI wit...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ...fied UI without configuration complexity ## π Quick Start ### Prerequisites - Pyt...
(QB_NEW_EN)
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md around
line 12, the two bullet items "Real-time Responses" and "Clean Interface" have
been concatenated on a single line; split them into two separate list items by
inserting a line break and starting each item on its own line using the same
list marker and formatting (e.g., "- **β‘ Real-time Responses**: Fast answer
generation" and "- **π― Clean Interface**: Simplified UI without configuration
complexity").
cd rag_examples/agentic_rag_gpt5 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Correct the cd path to match the repo structure.
The file lives under examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5.
- cd rag_examples/agentic_rag_gpt5
+ cd examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5
You can confirm with:
π Script executed:
#!/bin/bash
fd -a agentic_rag_gpt5.py -t f
Length of output: 132
Update cd path to the correct directory
Replace the cd
command to include the full relative path.
- cd rag_examples/agentic_rag_gpt5
+ cd examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5
π Committable suggestion
βΌοΈ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
cd rag_examples/agentic_rag_gpt5 | |
``` | |
cd examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5 |
π€ Prompt for AI Agents
In examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5/README.md around
lines 25-26, the README uses a shortened cd command ("cd
rag_examples/agentic_rag_gpt5"); update it to the full relative path so readers
run "cd examples/python/tools/exa-tool/rag_examples/agentic_rag_gpt5" instead,
replacing the existing cd line with the corrected path.
User description
ποΈ Add Agentic RAG Python Implementation to Tools
π Description
This PR adds a comprehensive RAG (Retrieval-Augmented Generation) agent implementation to the Python tools section. The example demonstrates how to build an AI agent specialized in Thai recipes with web search capabilities using PraisonAI framework.
β¨ Features
π― What's Included
rag_agent.py
- Main RAG agent implementationPR Type
Enhancement
Description
Add Thai recipe RAG agent implementation
Integrate web search capabilities with PraisonAI
Include PDF knowledge base reference
Provide interactive chat interface
Diagram Walkthrough
File Walkthrough
rag_agent.py
Thai Recipe RAG Agent Implementation
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Βexamples/python/tools/exa-tool/rag_examples/agentic_rag/rag_agent.py
Summary by CodeRabbit
New Features
Documentation
Bug Fixes / Known Issues