5 ms·
Thanks! I'm not very familiar with Neo4j and Cypher yet. How do you control the context using Cypher? Do you manually write queries for each request, or do you
by chatchan 2mo ago
Thanks! I'm not very familiar with Neo4j and Cypher yet. How do you control the context using Cypher? Do you manually write queries for each request, or do you select nodes through the interface and then automatically generate queries? I'm also curious about how the graph structure obtained from the query is ultimately transformed into an ordered model context.
- UltraSane 2mo agoI model the chat as a series of prompt and response nodes like (prompt)-[:NEXT]->(response) and can choose a given context by using a path query MATCH p = (:prompt{id:<>})-[:NEXT*]->(:response{id:<>}) RETURN p and extract the text from the nodes and format it as the API requires.
- chatchan 2mo agoThanks, oh I see, Cypher acts as a context selector. ThoughtDAG addresses the same issue but uses a visual approach: it searches for nodes first, then uses connections or references to determine which content enters the request. I'd love to see how it compares to writing Cypher directly, especially after conversations start branching and merging, if you get a chance to try it.