implement a structure unit 3 on the use case
This commit is contained in:
@@ -52,19 +52,23 @@
|
||||
title: Let's Fine-Tune your model for Function-calling
|
||||
- local: bonus-unit1/conclusion
|
||||
title: Conclusion
|
||||
- title: Unit 3. Use Case for Agentic RAG
|
||||
sections:
|
||||
- local: unit3/agentic-rag/gala.mdx
|
||||
title: A Gala to Remember
|
||||
- local: unit3/agentic-rag/agentic-rag.mdx
|
||||
title: Agentic Retrieval Augmented Generation (RAG)
|
||||
- local: unit3/agentic-rag/invitees.mdx
|
||||
title: Give your agent a database
|
||||
- local: unit3/agentic-rag/tools.mdx
|
||||
title: Creating a Weather Tool
|
||||
- local: unit3/agentic-rag/memory.mdx
|
||||
title: Give your agent a memory
|
||||
- local: unit3/agentic-rag/agent.mdx
|
||||
title: Putting your agent to the test
|
||||
- local: unit3/agentic-rag/conclusion.mdx
|
||||
title: Conclusion
|
||||
- title: When the next steps are published?
|
||||
sections:
|
||||
- local: communication/next-units
|
||||
title: Next Units
|
||||
- title: Unit 3.1 Use Cases - Agentic RAG using smolagents
|
||||
sections:
|
||||
- local: unit3/agentic-rag/gala.mdx
|
||||
title: A Gala to Remember
|
||||
- local: unit3/agentic-rag/agentic-rag.mdx
|
||||
title: Agentic Retrieval Augmented Generation (RAG)
|
||||
- title: Unit 3.2 Use Cases - Agentic RAG
|
||||
sections:
|
||||
- local: unit3/agentic-rag/gala.mdx
|
||||
title: A Gala to Remember
|
||||
- local: unit3/agentic-rag/agentic-rag.mdx
|
||||
title: Agentic Retrieval Augmented Generation (RAG)
|
||||
title: Next Units
|
||||
@@ -1,4 +1,4 @@
|
||||
# Importing a Tool from the LlamaHub to Websearch Actualities
|
||||
# Give your agent access to the web
|
||||
|
||||
Remember that we want Alfred to establish his presence as true renaissance host, with a deep knowledge of the world.
|
||||
|
||||
@@ -6,27 +6,3 @@ To do so, we need to make sure that Alfred has access to the latest news and inf
|
||||
|
||||
Let's start by creating a web search tool for Alfred!
|
||||
|
||||
## Websearch using DuckDuckGoSearchToolSpec
|
||||
|
||||
Remember the [`ToolSpecs`](https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/tools/#tool-specs) from the previous unit?
|
||||
We can use them to create a web search tool for Alfred.
|
||||
Generally, when working with web search, DuckDuckGo is a good choice, as it is a search engine that is open to all and does not require any authentication.
|
||||
To create a web search tool for Alfred, we can use the [`DuckDuckGoSearchToolSpec`](https://llamahub.ai/l/tools/llama-index-tools-duckduckgo?from=).
|
||||
|
||||
Let's create the tool spec for the web search tool.
|
||||
|
||||
```python
|
||||
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
|
||||
from llama_index.agent.openai import OpenAIAgent
|
||||
|
||||
tool_spec = DuckDuckGoSearchToolSpec()
|
||||
|
||||
agent = OpenAIAgent.from_tools(DuckDuckGoSearchToolSpec.to_tool_list())
|
||||
|
||||
agent.chat("What are the latest developments in machine learning?")
|
||||
agent.chat("What does the word 'renaissance' mean?")
|
||||
```
|
||||
|
||||
We can see that the agent is able to use the tool to search the web for information.
|
||||
|
||||
Great, let's continue with a a tool that can help Alfred get the weather information!
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# Creating Your Gala Agent
|
||||
|
||||
18
units/en/unit3/agentic-rag/conclusion.mdx
Normal file
18
units/en/unit3/agentic-rag/conclusion.mdx
Normal file
@@ -0,0 +1,18 @@
|
||||
# Conclusion
|
||||
|
||||
In this unit, we've learned how to create an agentic RAG system to help Alfred, our friendly neighborhood agent, prepare for and manage an extravagant gala.
|
||||
|
||||
We've covered:
|
||||
- Setting up the gala scenario and requirements
|
||||
- Understanding Agentic Retrieval Augmented Generation (RAG)
|
||||
- Creating a database for guest information
|
||||
- Building a custom weather tool for scheduling fireworks
|
||||
- Implementing web search capabilities for real-time information
|
||||
- Adding memory to our agent for better conversation flow
|
||||
- Testing our agent in various scenarios
|
||||
|
||||
With these tools and capabilities, Alfred is now well-equipped to be the perfect host, able to answer questions about guests, provide up-to-date information, and ensure the gala runs smoothly - even managing the perfect timing for the fireworks display!
|
||||
|
||||
The combination of RAG with agentic capabilities demonstrates how powerful AI assistants can become when they have access to both structured knowledge and the ability to take actions based on that knowledge.
|
||||
|
||||
In the next unit, we'll explore more advanced agent capabilities and continue building on what we've learned.
|
||||
1
units/en/unit3/agentic-rag/memory.mdx
Normal file
1
units/en/unit3/agentic-rag/memory.mdx
Normal file
@@ -0,0 +1 @@
|
||||
# Give your agent a memory
|
||||
@@ -1,4 +1,20 @@
|
||||
# Creating a Custom Tool for Weather Information to Schedule the Fireworks
|
||||
# Giving your agents access to the web
|
||||
|
||||
In this unit, we'll be giving Alfred access to the web to help him find the latest news and information about the world.
|
||||
|
||||
## Give your agent access to the web
|
||||
|
||||
Remember that we want Alfred to establish his presence as true renaissance host, with a deep knowledge of the world.
|
||||
|
||||
To do so, we need to make sure that Alfred has access to the latest news and information about the world.
|
||||
|
||||
Let's start by creating a web search tool for Alfred!
|
||||
|
||||
```python
|
||||
|
||||
```
|
||||
|
||||
## Creating a Custom Tool for Weather Information to Schedule the Fireworks
|
||||
|
||||
Remember that we need to make sure the fireworks are not cancelled due to bad weather?
|
||||
|
||||
@@ -11,4 +27,4 @@ Let's create a custom tool that can be used to call an external weather API and
|
||||
|
||||
```python
|
||||
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user