-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add Support for Node and Relationship Properties in LLMGraphTransformer for LLMs without native function calling #42
Conversation
Hi @ccurme, @efriis, @Levara, @tomasonjo could someone please review this PR? 🙏 |
Hi @kartikpersistent, @kaustubh-darekar Following our discussion in Issue #1002, I’ve implemented support for node_properties and relationship_properties in the |
Which models have you tested this with? Looks a bit complicated for the LLM |
I have tested it with Llama-3.3-70B-Instruct-Turbo. |
Can you try with some 7b models? |
with this conf:
|
If issues occur with small models, we can separate the two prompts—the new one and the old one—and create two modes: advanced and simple. |
Can you make it so that the prompt only changes if someone defines node or
rel props, otherwise it stays the same, so we dont introduce breaking
changes
V ned., 9. feb. 2025, 11:47 je oseba Dhiaa Eddine ***@***.***>
napisala:
… If issues occur with small models, we can separate the two prompts—the new
one and the old one—and create two modes: advanced and simple.
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYGGTMDKNOL4XKI2PJKLB32O4W5LAVCNFSM6AAAAABWO536RKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBWGE3TENBVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @tomasonjo, thanks for your valuable input. Based on your suggestion, I've updated the implementation so that the prompt is modified only when node_properties or relationship_properties are explicitly provided. This ensures that if these parameters aren’t defined, the prompt remains unchanged, thereby avoiding any breaking changes for users who rely on the default behavior. I'll proceed with testing the updated code with both the enhanced configuration and the default setup. Please let me know if you have any further suggestions or concerns. |
Hi @ccurme, @efriis, @Levara, @tomasonjo could someone please review this PR? |
db4b777
to
930f13f
Compare
930f13f
to
b3172d8
Compare
This pull request addresses #40 by introducing support for the
node_properties
andrelationship_properties
parameters in theLLMGraphTransformer
for LLMs without native function calling. Previously, theLLMGraphTransformer
restricted the use of these parameters when working with LLMs lacking native function calling capabilities or whenignore_tool_usage
was set to True. This limitation compelled users to choose between utilizing lightweight or open-source LLMs without structured property enforcement and opting for more costly or proprietary models that support function calling. The current update removes this restriction, enabling the use ofnode_properties
andrelationship_properties
across a broader range of LLMs, thereby enhancing flexibility and functionality.