Dynamic AI Agents with LangGraph, Prompt Engineering Enhancements + RAG

5,183
0
Published 2024-07-25
Combining prompt-engineering techniques such as chain-of-reasoning and meta-prompting with Retrieval-Augmented Generation (RAG) on the fly has enabled me to develop a powerful agent for long-running, research-intensive tasks. Jar3d has internet access and significantly enhances tasks like creating newsletters, writing literature reviews, planning holidays, and other research-intensive activities. I will demonstrate Jar3d and explain how it operates at a high level. Jar3d is orchestrated with LangGraph.

Need to develop some AI? Let's chat: www.brainqub3.com/book-online

Register your interest in the AI Engineering Take-off course: www.data-centric-solutions.com/course

Hands-on project (build a basic RAG app): www.educative.io/projects/build-an-llm-powered-wik…

Stay updated on AI, Data Science, and Large Language Models by following me on Medium: medium.com/@johnadeojo

Jar3d GitHub repo: github.com/brainqub3/meta_expert

Meta Prompting Research Paper: arxiv.black/pdf/2401.12954

Professor Synapse: github.com/ProfSynapse/Synapse_CoR

Chapters
Introduction: 00:00
Jr3d Demo 02:49
Jar3d Architecture: 18:27
Overview of Jar3d code: 23:39
Prompt Engineering: 31:45
Reviewing Jar3d Newsletter: 44:20
Strengths & Weaknesses: 58:43

All Comments (21)
  • @EdFife
    I appreciate your approach and your open source of the code. You have inspired me with some of your other tutorials. Thank you! This framework is less chatty than Autogen and CrewAI. I swear Autogen can do 5 iterations complimenting each other and saying thank you for the feedback. This has amazing amounts of potential. My first plan to extend would be to allow the lower tasks be done with a local model and higher level tasks go through a commercial model. Then maybe a GUI.
  • Just ran the Meta Agent on my RTX4090 with Llama3.1:70b. It worked great using the Serpa tool. Huge thanks for all your effort!
  • @sebbecht
    really impressive! Definitely want a deeper technical dive on the tool expert.
  • @malikrumi1206
    Posted 17 minutes ago, and I am here among the first as usual. Teach us!
  • @DavidSeguraIA
    🎯 Key points for quick navigation: 00:00:12 πŸ€– The speaker introduces "Jared," an AI agent designed for long-term research tasks using meta prompting, agentic RAG, and chain of reasoning. 00:01:24 πŸ› οΈ Jared's development and logic are detailed, focusing on meta prompting, agentic RAG, and their implementation through Python code. 00:03:14 🐳 Setting up Jared involves configuring an ingestor server via Docker and initializing Jared with specific model choices, facilitating long-term research capabilities. 00:05:46 πŸ“Š Jared integrates meta prompting to refine goals and gather aligned requirements, employing an iterative chain of reasoning approach to enhance task comprehension. 00:08:41 πŸ“° Jared facilitates the creation of concise, informative newsletters by refining goals through meta prompting and tailored questioning, ideal for AI enthusiasts and developers. 00:12:31 πŸ”„ Jared's meta expert role orchestrates internet research, writing, and planning tasks based on refined requirements, enhancing workflow efficiency. 00:18:32 πŸ› οΈ The Jared architecture utilizes LangGraph for workflow orchestration, incorporating state management to track interactions and process outputs effectively. 24:14 πŸ“Š LangGraph allows recording and accessing various states in workflows, facilitating flexible data handling. 25:45 πŸ› οΈ The tool expert within the system is complex, involving stages like document ingestion and utilizing a modified Tika server for processing. 26:56 πŸ“‘ RAG on the fly involves document embedding and local model ranking to refine research outputs for meta prompting agents. 29:15 πŸ”„ Agent graphs define the workflow sequence from Jared through various expert agents, directed by a router based on meta prompt outputs. 30:42 🧠 Setting recursion limits enhances the capability of Jared to manage complex, long-running tasks effectively without needing an infinite context window. 45:55 πŸ“Š Jared's workflow involves iterative retrieval from diverse sources to gather comprehensive information, essential for creating newsletters. 46:51 🌐 Jared's approach mimics extensive web research to compile and synthesize content into coherent newsletters. 48:42 πŸ“ˆ Llama 3.1 models offer various sizes and performance benchmarks, showing competitive advantages in AI tasks. 50:05 πŸ’° Llama 3.1 models significantly reduce costs compared to other models, making them more accessible for developers. 51:48 πŸ› οΈ Llama stack API development is mentioned, despite some hallucinations in the source material. 59:28 🚫 Jared's limitations include potential crashes beyond 128k context and issues with model convergence in less capable versions like Llama 3.1 70B. 01:02:18 🌍 Llama 3.1 405B models facilitate complex workflows like Jared's, enhancing possibilities for enterprise-level AI applications.
  • @fpsteiner9274
    Great inspiration, thank you! I'd be particularly interested in using jared to build his own tools after having determined the detailed specs.
  • @jakeparker918
    Thanks for posting this! Feels good to know using AI for finding information is out in the ether, excited to see what the future of open source brings
  • Great content, interesting idea, appreciate the code walkthrough. At 29:23 you enlarged the font- much easier to read along!
  • Crazy to think that I made a turd comment on the first video that I saw where you criticized CrewAI. Unsubscribed, and then shortly resubscribed after watching quite a few of your other videos. Sure enough, you were right. Now, I look forward to your content more than the numerous other channels I follow. Keep it going. Extremely helpful for a dev learning AI. And sorry for being a turd
  • @aaagaming2023
    Great content mate! Youve just earned a new subscriber.
  • @donconkey1
    Great video! I appreciate your methodical approach and precision in developing pipelines and strategies to test the capabilities of SOTA LLMs. Your gentle nudge towards Markdown for prompts is valuable. Have you considered handing off the TLDR LLaMA 3.1 goal to Perplexity to compare the results? Thanks to you, I now better understand why expert prompting is essential for success.