fix: top 3 entities get full body in prompt, not just top 1
When two related entities match (advisor hire + research grant), both need full content so Opus can distinguish them and serve the right one. Pentagon-Agent: Epimetheus <3D35839A-7722-4740-B93D-51157F7D5E70>
This commit is contained in:
parent
f77fd229d6
commit
28be7555b1
1 changed files with 2 additions and 2 deletions
|
|
@ -581,8 +581,8 @@ def format_context_for_prompt(ctx: KBContext) -> str:
|
|||
sections.append("## Matched Entities")
|
||||
for i, ent in enumerate(ctx.entities):
|
||||
sections.append(f"**{ent.name}** ({ent.entity_type}, {ent.domain})")
|
||||
# Top entity gets full content (up to 2000 chars), rest get truncated
|
||||
if i == 0:
|
||||
# Top 3 entities get full content, rest get truncated
|
||||
if i < 3:
|
||||
sections.append(ent.overview[:2000])
|
||||
else:
|
||||
sections.append(ent.overview[:500])
|
||||
|
|
|
|||
Loading…
Reference in a new issue