LangChain Agent - Comparing and summarizing the file as a output - Need help #28310
Replies: 1 comment
-
I found a similar discussion titled Text files Comparion - Need Help that might be relevant to your query. It is currently unsolved and was last updated on November 14, 2024 [1]. To achieve your goal using LangChain, you can create two agents, each responsible for processing one of the files. You can then use a language model to analyze the outputs of these agents and generate a summary that captures the relationships and issues described in both files. Here’s a general approach you could take:
This approach leverages the strengths of language models in understanding and reasoning with natural language, allowing you to go beyond simple text comparison. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am planning to create two agents, where each agent reads a different file. For example, Agent 1 reads file1, and Agent 2 reads file2.
file1 contains: "part1 is used in section."
file2 contains: "part2 is broken, and part1 is broken."
My desired output, after comparing the contents of both files, would be: "part1 in the section1 is broken."
I do not want a simple text comparison. Instead, I would like to leverage LLMs (Large Language Models) and Langchain to creatively write a prompt that compares these two files in a more sophisticated way. Specifically, I want the agents to use natural language understanding and reasoning to match and extract information from both files, and then generate the desired output.
Could you help me achieve this with Langchain agents?
Beta Was this translation helpful? Give feedback.
All reactions