Chain of Thought
As your app grows in complexity (e.g. Chain of Thoughts, LangChain), understanding the process behind generating a specific answer can become challenging.
To help you overcome this issue, Chainlit allows you to easily explore the reasoning process right from the user interface.
Take a look at this screenshot from the LangChain MRKL example:
It’s evident that several intermediate steps are needed to answer the initial question. Additionally, each step might involve another tool, resulting in a tree-like structure.
Chainlit simplifies this process by enabling you to visualize and navigate through these otherwise complicated reasoning pathways.
You can hide the chain of thought by setting the hide_cot
parameter to true
in your config file!
How it works
If you are using the LangChain integration, every intermediary step is automatically sent and displayed in the Chainlit UI.
In Pure Python, you can use the parent_id
and prompt class to display the intermediary steps.
Was this page helpful?