https://github.com/anakin87/try-agents-haystack
Trying the Agents π΅οΈ --> new feature introduced in Haystack 1.15.0 to make Large Language Models resolve complex queries and tasks
https://github.com/anakin87/try-agents-haystack
generative-ai haystack language-model large-language-models natural-language-processing nlp
Last synced: 9 months ago
JSON representation
Trying the Agents π΅οΈ --> new feature introduced in Haystack 1.15.0 to make Large Language Models resolve complex queries and tasks
- Host: GitHub
- URL: https://github.com/anakin87/try-agents-haystack
- Owner: anakin87
- Created: 2023-04-04T15:35:01.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-05T10:03:30.000Z (almost 3 years ago)
- Last Synced: 2025-04-01T02:52:49.528Z (10 months ago)
- Topics: generative-ai, haystack, language-model, large-language-models, natural-language-processing, nlp
- Language: Jupyter Notebook
- Homepage:
- Size: 2.41 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# try-agents-haystack
Trying the Agents π΅οΈ --> new feature introduced in [Haystack](https://github.com/deepset-ai/haystack) 1.15.0 to make Large Language Models resolve complex queries and tasks.
---
As of release 1.15, Haystack implements Agents π΅οΈ!
Put simply, an Agent is a Large Language Model with a specific prompt.
Based on that prompt, the Agent can answer complex questions, by performing a sequence of steps.
At each step, the Agent (our brain π§ ) can select a Tool from its toolbox π§° and use it to accomplish a task.
Some examples of Tools: Web Search, calculator, several pipelines/nodes (available in Haystack)...
## Demo
https://user-images.githubusercontent.com/44616784/229845195-c2d6f5a5-8354-4816-aa21-6e29c06b149f.mp4
In the video, you see the Agent in action with the task of answering questions about books on my reading list.
* I uploaded a CSV containing a minimal reading list π
* I initialized two Tools βοΈ:
* A Question Answering component to answer questions about my reading list
* A Search tool ππ, which can browse the web and find information
* I defined an Agent, based on Davinci model and equipped with the Tools defined above.
* Now I can ask complex questions, such as "Can you provide me with information on the shortest book on my reading list, including author and price on Amazon?""
π
Currently, Agents work great with OpenAI Davinci model.
Soon, open-source models will also be supported, so you can have the power of LLM at your disposal without giving up your data!
## More information
### Agents in Haystack
- [Introducing Agents in Haystack: Make LLMs resolve complex tasks](https://haystack.deepset.ai/blog/introducing-haystack-agents) by Tuana Γelik
- [Tutorial: Answering Multihop Questions with Agents](https://haystack.deepset.ai/tutorials/23_answering_multihop_questions_with_agents)
- [Haystack documentation: the Agent](https://docs.haystack.deepset.ai/docs/agent)
### Papers
- [ReAct: Synergizing Reasoning and Acting in Language Models](https://arxiv.org/abs/2210.03629)
- [MRKL Systems: A modular, neuro-symbolic architecture that combines large language models, external knowledge sources and discrete reasoning](https://arxiv.org/abs/2205.00445)