[Question]: Is there any way to retrieve specific range of nodes in the knowledge database for query? #1823
Replies: 1 comment
-
|
I realize that this problem may have a more professional solution, or in order to achieve the function I mentioned, it may require a very large code modification, so I think it may not be in the developer's plan. And the method I mentioned may not be rigorous enough to meet the conditions for making PRs. I have some simple throught, such as adding the file name to the chunk when chunking, so that in the Index stage, LLMs will know that this chunk is about {filename}, even if we need to add one more step to maintain filenames of the uploaded files. If you have similar ideas, I am really looking forward to discussing these issues with you on Discord or WeChat. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Do you need to ask a question?
Your Question
Neo4j Community edition does not support creating multiple databases, so normal queries go through the whole knowledge database created previously. If you store everything inside one database, I think it will inevitably extract some irrelevant content.
I tried to ran this test to put two completely conflicting descriptions of the same character "Hamlet" into the same neo4j database. And then made a query to ask about Hamlet's character
`
The Indecision Overthinker:
"I'm Hamlet—a man who thinks too much and acts too little. I question everything, second-guess every move, and get lost in my own doubts. Even when I know what must be done, I hesitate, trapped in endless 'what ifs.' My mind is my greatest enemy, paralyzing me when action is needed most. I'm not weak—just too aware of consequences, too afraid of making the wrong choice."
The Ruthless Avenger:
"I’m Hamlet—a man who doesn’t hesitate when justice demands blood. I play the fool to deceive my enemies, but when the moment comes, I strike without mercy. I’ve sent traitors to their deaths, manipulated friends, and embraced violence when necessary. My father’s ghost called for vengeance, and I delivered. If others think me cruel, so be it—betrayal deserves no pity."
`
Compelete Output:
`
Hamlet's Character Overview
Hamlet is depicted as a complex figure torn between indecision driven by overthinking and a ruthless pursuit of vengeance. His indecisiveness stems from existential doubt, fear of consequences, and a mind that acts as his "greatest enemy" (KG: The Indecisive Overthinker.txt). Overthinking paralyzes him, creating cycles of hesitation where he second-guesses every decision and fixates on potential negative outcomes. This mental paralysis manifests as inaction, even when he recognizes the necessity of action. Conversely, his vengeful side embraces violence as a "necessary means to achieve vengeance" (KG: The Ruthless Avenger.txt), driven by his father’s ghost and a moral framework justifying cruelty in the name of justice.
Key Traits and Contradictions
Indecision and Overthinking:
Hamlet’s analytical nature leads to excessive doubt and procrastination. His mind amplifies fears of consequences, trapping him in "endless 'what ifs'" (DC: Source 1). Existential doubt further fuels this cycle, making decisions feel insurmountable. Relationships like those between Overthinking and Hesitation (KG: id21, 22) highlight how his cognitive struggles directly hinder action.
Vengeance and Violence:
While indecisive in personal matters, Hamlet acts decisively when pursuing vengeance. He views violence as "necessary" to punish betrayal (KG: id30) and frames his actions as fulfilling a just cause (KG: id26). However, his merciless methods are perceived as cruel by others, creating a moral contradiction (KG: id29, 10).
Conclusion
Hamlet’s duality—philosophical inaction versus violent resolve—defines his character. His internal conflicts (mind vs. action) and external actions (vengeance) reflect a struggle between introspection and retribution, making him a tragic figure caught between thought and consequence.
References:
[DC] "I'm Hamlet—a man who thinks too much and acts too little..." (File: The Indecisive Overthinker.txt)
[DC] "I'm Hamlet—a man who doesn’t hesitate when justice demands blood..." (File: The Ruthless Avenger.txt)
[KG] "Hamlet's overthinking is the root cause of his indecision..." (Relationship id1, File: The Indecisive Overthinker.txt)
[KG] "Hamlet embraces violence as a necessary tool to fulfill his vengeance." (Relationship id5, File: The Ruthless Avenger.txt)
[KG] "Vengeance is directly tied to the betrayal committed against Hamlet's father..." (Relationship id30, File: The Ruthless Avenger.txt)
`
In sum, If we store everything in one database, every query will extract all the knowledge about this entity, whether they are valid or invalid, real or fake.
Each node saved under Neo4j database has file_path and upload date properties, is there a way to only fetch nodes with specific value of the property, like upload file name or upload date?
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions