Building STORM from scratch with LangGraph
ฝัง
- เผยแพร่เมื่อ 14 ต.ค. 2024
- AI assistants have great potential to automate web research and content generation. A recent work from Shao et al (STORM: Synthesis of Topic Outlines through Retrieval and Multi-perspective Question Asking) offers a new approach for web research to generate Wikipedia-style articles.
It creates wiki editor personas to ask questions about a user-provided topic and experts aided by search to answer questions about a user-provided topic. The two converse, creating an information rich corpus of questions, answer, and references. Then, use this to flesh out a wiki outline in several stages of refinement.
In this video, we show how to implement these ideas using LangGraph from scratch. In it, we create a well structured wiki focused on "Groq and the future of inference" in less than 5 minutes.
Paper:
arxiv.org/abs/...
Notebook:
github.com/lan...
This and the RAPTOR implementation are some of the coolest projects on your channel. Excited to see what else ya'll have been cooking up lately!
Another application of STORM will be automating Report generation given a ton of documents for reference. Replacing wikipedia by the reports. This is just an idea. I dont know if its possible.
Thank you for the explainer video! Interesting concept which can be adopted for other tasks as well… 😊
Great job! I had done more or less the same without langgraph. But this makes it much more elegantly.
Just a technical question: in langgraph, as the graph state is a TypeDict schema, it can't carry the llm not the vectorstore, right?... But, in most nodes, we need to create a Runnable using an llm, and ideally a retriever from a vectorstore. Does this mean that the llm and vectorstore should always remain global variables?
Pls make a video on
1) write a blog on a topic ,
-- search across web what are the topics related to it..
--search what are the most questions asked by user over search engine realted to blog
-- cover most of targeted questions in my blog
--in my blog, there should be a index, start, main, images, visually charts, graph end point.., and FAQ
Can you take challenge for this, and make video on this..?
Great tutorial!
Can you also show how much it cost overall at the end moving forward?
Appreciate all your work!
I tried this with OpenAI gpt-4 turbo and the overall cost came to about $0.14
@@akhilhem1 That's not bad at all. Thanks for sharing!
You can see all the cost info in LangSmith if you run!@@Tarun_Mamidi
Nice, Thanks
The content for each subsections is short. How can we make it longer?
You can try better prompting or add another writer that will expand the topic in details with unlimited depth, virtually
@@tyessenov thanks mate
Could this be used to fill out predefined templates as well? I’m assuming yes if you provide the template and ensure each section of the template is filled out appropriately.
Totally - rather than prompting for a wiki structure, you could define your own template and have the system fill it in
Is there a way to deploy this as langserve API?
Yes! The graph itself should be deployable directly (after running .compile())
Thanks a lot! This is really useful. I am getting the following error while running the code interview_graph.astream(initial_state): Error code: 400 - {'error': {'message': "'Dr. Innovation' does not match '^[a-zA-Z0-9_-]{1,64}$. Any idea what could be the possible reason? I had to change the name of "Subject Matter Expert" to Subject_Matter_Expert. But got stuck again with the editors name.
Did you find a solution to this problem ? Getting the same problem tried fixing but still struggling.
same error
Hello, I also had this problem. I solved it by changing the versions of the langchain packages to older ones, i.e.:
langchain-community 0.0.25
langchain-core 0.1.29
langchain-fireworks 0.1.0
langchain-openai 0.0.8
langgraph 0.0.26
langsmith 0.1.11. @@codewithbod
same error
same error any idea ?
i get error on final step it stays None AttributeError Traceback (most recent call last)
in ()
----> 1 final_state = next(iter(final_step.values()))
AttributeError: 'NoneType' object has no attribute 'values'
I have the same error
16:22 I have also same issue. final_step is always None because somehow the END is not coming from graph. Are you able to fix it somehow?
i have the same error, fully one day wasting on it