Repository navigation
Question about dynamic_context_traversal(): Vector Results and Graph Expansion
#2263
|
Hi Semantica team, While exploring the I noticed a few things in the current implementation that I'm trying to understand. In vector_results = self.vector_search(query, limit=20)
for result in vector_results:
if result.get("type") in entity_types:
relevant_entities.append(result)However, The exception is caught by the outer There also seems to be another issue in the graph expansion step: raw_context = self.expand_context(query, max_hops=max_hops)The method collects Additionally, My questions:
I think addressing these points would make the dynamic context assembly feature more reliable, especially for GraphRAG applications where vector retrieval is expected to identify starting entities for multi-hop traversal. Would appreciate your thoughts on the intended behavior. Thanks! |
Replies: 1 comment
|
All three hold. I checked v0.7.0 (latest release) and current
I ran it on Minimal fix: read type and id from No test catches it: |
All three hold. I checked v0.7.0 (latest release) and current
main(3ebdb95), where the method is unchanged.vector_search()returnsretrieve()'s list ofRetrievedContext, a plain dataclass with no.get. So L2784 raises AttributeError and the except logs one ERROR line and returns{"context": [], "metadata": {}}. Also,limit=20is ignored:retrieve()takesmax_results(default 5).expand_context(entity_id)for each ofrelevant_entities[:10]; 194a72d ("resolve all failing tests") replaced that withexpand_context(query)."Unknown"is hard-coded at L2950. On aContextGraphit's worse:get_neighbors()returns dicts that a…