updated based on review

This commit is contained in:
sergiopaniego
2025-03-31 15:14:25 +02:00
parent b97c9b7ea3
commit c01a329cc8
3 changed files with 8 additions and 4 deletions

View File

@@ -112,8 +112,6 @@
sections:
- local: unit3/agentic-rag/introduction
title: Introduction to Use Case for Agentic RAG
- local: unit3/agentic-rag/gala
title: A Gala to Remember
- local: unit3/agentic-rag/agentic-rag
title: Agentic Retrieval Augmented Generation (RAG)
- local: unit3/agentic-rag/invitees

View File

@@ -13,6 +13,12 @@ Imagine Alfred mingling among the guests, needing to recall specific details abo
This is where Retrieval Augmented Generation (RAG) shines! By combining a retrieval system with an LLM, Alfred can access accurate, up-to-date information about your guests on demand.
<Tip>
You can choose any of the frameworks covered in the course for this use case. Select your preferred option from the code tabs.
</Tip>
## Setting up our application
In this unit, we'll develop our agent within a HF Space, as a structured Python project. This approach helps us maintain clean, modular code by organizing different functionalities into separate files. Also, this makes for a more realistic use case where you would deploy the application for public use.

View File

@@ -45,13 +45,13 @@ tool_spec = DuckDuckGoSearchToolSpec()
search_tool = FunctionTool.from_defaults(tool_spec.duckduckgo_full_search)
# Example usage
response = search_tool("Who's the current President of France?")
print(response)
print(response.raw_output[-1]['body'])
```
Expected output:
```
[{'title': 'President of France - Wikipedia', 'href': 'https://en.wikipedia.org/wiki/President_of_France', 'body': 'The president of France, officially the president of the French Republic (French: Président de la République française), is the executive head of state of France, and the commander-in-chief of the French Armed Forces.As the presidency is the supreme magistracy of the country, the position is the highest office in France. The powers, functions and duties of prior presidential offices, in ...'}, {'title': 'Emmanuel Macron - Wikipedia', 'href': 'https://en.wikipedia.org/wiki/Emmanuel_Macron', 'body': 'Emmanuel Jean-Michel Frédéric Macron (French: [emanɥɛl makʁɔ̃] ⓘ; born 21 December 1977) is a French politician who has served as President of France since 2017. He was Minister of Economics, Industry and Digital Affairs under President François Hollande between 2014-16. He has been a member of Renaissance since he founded it in 2016.. Born in Amiens, Macron studied philosophy at ...'}, {'title': 'Emmanuel Macron - Wife, Education & Family - Biography', 'href': 'https://www.biography.com/political-figures/emmanuel-macron', 'body': "Former economy minister Emmanuel Macron was elected president of France in 2017, making him the youngest president in the country's history. Search Women's History Month"}, {'title': 'Presidency of Emmanuel Macron - Wikipedia', 'href': 'https://en.wikipedia.org/wiki/Presidency_of_Emmanuel_Macron', 'body': 'Emmanuel Macron is currently serving as the 25th president of France.He took office upon winning the 2017 French presidential election.Macron was the founding member of Renaissance (originally En Marche ! and later La République En Marche !He defeated National Rally nominee Marine Le Pen.He again defeated Le Pen in the 2022 French presidential election.'}, {'title': 'Emmanuel Macron | Biography, Political Party, Age, Presidency, & Facts ...', 'href': 'https://www.britannica.com/biography/Emmanuel-Macron', 'body': "Emmanuel Macron (born December 21, 1977, Amiens, France) is a French banker and politician who was elected president of France in 2017. Macron was the first person in the history of the Fifth Republic to win the presidency without the backing of either the Socialists or the Gaullists, and he was France's youngest head of state since Napoleon I.He was reelected in 2022, becoming the first ..."}, {'title': 'Welcome to the website of the French Presidency - Élysée', 'href': 'https://www.elysee.fr/en/', 'body': "Welcome to the official website of the President of France The President's latest news All news 21 September 2023 State Visit of His Majesty King Charles III and Queen Camilla. 20 March 2025 European Council - 20 & 21 March 2025. 17 March 2025 Working lunch with the ..."}, {'title': 'Emmanuel Macron - Élysée', 'href': 'https://www.elysee.fr/en/emmanuel-macron', 'body': 'Emmanuel Macron is the eighth President of the Fifth Republic of France. He launched the movement « En Marche ! », founded on 6 April 2016, and was its leader until his victory in the presidential election on 7 May 2017. On 24 April 2022, Emmanuel Macron was re-elected President of the Republic.'}, {'title': 'Who is the current president of France? - ump-lycees.fr', 'href': 'https://www.ump-lycees.fr/en/who-is-the-current-president-of-france', 'body': 'Emmanuel Macron, born on December 21, 1977, is the current president of the French Republic.In office since May 14, 2017, he was re-elected on April 24, 2022 with 58.55% of the votes against his competitor Marine Le Pen. With a background in higher public service and investment banking, Macron approaches his mandate with a desire for change and innovation in various fields, including economics ...'}, {'title': 'Who is the President of France? - WorldAtlas', 'href': 'https://www.worldatlas.com/articles/who-is-the-president-of-france.html', 'body': "Emmanuel Macron is the current French President and also Andorra's ex-official Co-Prince. Before joining politics, he worked in various senior positions as a civil servant and he served in the Inspectorate General of Finances as an Inspector of Finances. In 2012, President Francois Hollande selected Macron as the Deputy Secretary-General in ..."}, {'title': 'President of the French Republic - Simple English Wikipedia, the free ...', 'href': 'https://simple.wikipedia.org/wiki/President_of_the_French_Republic', 'body': 'The President of the French Republic is the head of state of France. The current President is Emmanuel Macron since 14 May 2017 defeating Marine Le Pen in the second round of the presidential election on 7 May 2017. List of French presidents (Fifth Republic) N° Portrait Name ...'}]
The President of the French Republic is the head of state of France. The current President is Emmanuel Macron since 14 May 2017 defeating Marine Le Pen in the second round of the presidential election on 7 May 2017. List of French presidents (Fifth Republic) N° Portrait Name ...
```
</hfoption>