-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphCypherQAChain: Dynamic inputs cypher generation #24300
GraphCypherQAChain: Dynamic inputs cypher generation #24300
Conversation
…e inputs for cypher generation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
"question": question, | ||
"schema": self.graph_schema, | ||
} | ||
args.update(inputs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does args.update not duplicate the question content? under the key self.input_key
Is there any unit test you could write?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question, regarding the content duplication, if the input_key for the question is different than "question" it will indeed duplicate because the default template uses "question" and I cant guarantee that the user didn't specified other cypher_prompt
template.
At the end of the day will not impact if it duplicate.
But give me your feedback on this.
@eyurtsev should I include tests for more edge cases? I can open another PR. Give your feedback on this. |
…rovided by the user for cypher generation (langchain-ai#24300) **Description:** This PR introduces a change to the `cypher_generation_chain` to dynamically concatenate inputs. This improvement aims to streamline the input handling process and make the method more flexible. The change involves updating the arguments dictionary with all elements from the `inputs` dictionary, ensuring that all necessary inputs are dynamically appended. This will ensure that any cypher generation template will not require a new `_call` method patch. **Issue:** This PR fixes issue langchain-ai#24260.
Description: This PR introduces a change to the
cypher_generation_chain
to dynamically concatenate inputs. This improvement aims to streamline the input handling process and make the method more flexible. The change involves updating the arguments dictionary with all elements from theinputs
dictionary, ensuring that all necessary inputs are dynamically appended. This will ensure that any cypher generation template will not require a new_call
method patch.Issue: This PR fixes issue #24260.