shaolang

shaolang

A Common-Sense Guide to AI Engineering: Appending results to rag_chunks in research_docs (sub-agent) (page: 216 and page 226)

hi, Jay

research_docs maintains a rag_chunks dictionary at the start of the function and the results from search_manual and read_webpage are added to it. This rag_chunks dictionary is then inserted in to the conversation as a the result of the function call, i.e., rag_chunks keeps building up within the research_docs function. Supposed the agent created the following function calls:

  • search_manual
  • read_webpage
  • search_manual

The research history would be similar to the following:

FUNCTION CALL: { call_id: 1, search_manual }
FUNCTION CALL OUTPUT:  { call_id: 1, search_manual_output_1 }

FUNCTION CALL: { call_id: 2, read_webpage }
FUNCTION CALL OUTPUT:  { call_id: 2, search_manual_output_1, read_webpage_output_1 }

FUNCTION CALL: { call_id: 3, search_manual }
FUNCTION CALL OUTPUT:  { call_id: 3, search_manual_output_1, read_webpage_output_1 , search_manual_output_2}

It is unlike flow discussed on page 226.

Question then is: which is the desired outcome? The code on page 216 (with repeated outputs) or the discussion on 226 (without repeated outputs)? My hunch is the latter.

Where Next?

Popular Pragmatic Bookshelf topics Top

jimmykiang
This test is broken right out of the box… — FAIL: TestAgent (7.82s) agent_test.go:77: Error Trace: agent_test.go:77 agent_test.go:...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
jeffmcompsci
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list) Typo:...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
New
AufHe
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113. Iteration A1 - Seeing the list of prod...
New
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New

Other popular topics Top

PragmaticBookshelf
Ruby, Io, Prolog, Scala, Erlang, Clojure, Haskell. With Seven Languages in Seven Weeks, by Bruce A. Tate, you’ll go beyond the syntax—and...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
PragmaticBookshelf
Explore the power of Ash Framework by modeling and building the domain for a real-world web application. Rebecca Le @sevenseacat and ...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New

Sub Categories: