Closed grabbou closed 9 months ago
🤖
Thank you for your interest in contributing to LangChain! Your proposed feature of adding built-in support for using XMLs as a means of transportation sounds like a valuable addition to the framework.
It's great to hear that you have already implemented this feature locally and have tested it successfully. Your willingness to send a PR to the TypeScript implementation is much appreciated.
If you would like to pair with someone on the Python side to explain how things work with Claude, I encourage you to reach out to the LangChain community. They will be able to provide guidance and support as you work on your contribution.
Thank you for your dedication and enthusiasm in improving LangChain!
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Hi, @grabbou! I'm Dosu, and I'm here to help the LangChain team manage our backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, you requested built-in support for using XMLs as a means of transportation in the Claude XML parser. You have already implemented a rough version and are willing to contribute to the TypeScript implementation. I have responded, thanking you for your interest and suggesting that you reach out to the LangChain community for guidance and support.
If this issue is still relevant to the latest version of the LangChain repository, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your understanding and your contributions to the LangChain project!
Best regards, Dosu
Feature request
I find StructuredOutputParser to not work that well with Claude. It also takes quite a few tokens to output its format instructions.
It would be great to have a built-in support for using XMLs as a meaning of transportation.
Motivation
Claude supports and works really well with XML tags.
An example output:
As you can see, it works really well providing the answer inline the paragraph. Unlike StructuredOutputParser, we don't have to provide examples, explain the schema as well as ask to wrap the output in the markdown delimiter.
I would personally use something like regular expressions to look and parse the contents inside the tags, not forcing Claude itself to stick to any particular output format (such as "your response must be a valid XML document" etc.).
Your contribution
I would be happy to own this feature and send a PR to TypeScript implementation. I have already written this locally and have tested it to work quite well. Note it is a very rough implementation, as my understanding of the codebase is (at this point) rather limited. I am making my baby steps tho!
I would be happy to pair with someone on the Python side to explain how the things work with Claude.