Hi, thanks for making this intro to LangGraph. The framework looks really interesting.
I’m looking into lesson 6 Essay writer and either I don’t really understand the flow of information inside the graph or the provided example is half-baked and doesn’t implement the functionalities that are hinted at and that a student following the course expects.
-
In the writer node prompt we see this substring: “If the user provides critique, respond with a revised version of your previous attempts.”. It clearly hints to a student reading the code that the system will see it’s previous draft as well as the critique to generate the next essay in a following revision round. However, the only things that writer gets are task and content. content is the result of a search based of critique, however, the critique itself is not available to writer. Neither is the old draft.
-
The case of the research_plan node is similar. To conduct the search the node only gets access to task not the actual plan. This is mentioned in this topic AI Agents Course Essay writer Code Clarification where I believe the answer of the other user to be incorrect.
While one might say “this is a toy problem, it doesn’t matter whether writer has access to the previous draft or research_plan has access to the actual plan”, the first and foremost goal of this code should be maintaining high educational value. The code should be clear and do what a student following the course expects it to do. The actual “debugging” of the information flow is pretty tedious so it’s easy to assume that this system operates as expected based on the prompts themselves (and the video). Then one can easily imagine that people following this course will use the Essay writer code as a template for uni projects or even worse customer solutions and be convinced that it does something different than what actually happens.
One more half-baked example is the modification of the weather request to use accuweather results in lesson 5. While the query itself is modified, the search result from the accuweather webpage doesn’t even include any actual weather info! It’s the weatherapi search result that is used to generate the response. Again, one might say that it doesn’t matter as the bot provided the user with temperature info. But the educational quality takes a hit.
It is entirely possible that I didn’t grasp how LangGraph operates and my points are wrong. In that case, I will happily correct, edit or remove my message and statement.