feat(rag): feed whole matched documents to the LLM — no context truncation (A7 revised)
This commit is contained in:
+2
-4
@@ -126,9 +126,7 @@ def plan_turn(
|
||||
best_cosine = max((c.cosine for c in chunks), default=0.0)
|
||||
fts_hits = sum(1 for c in chunks if c.fts_hit)
|
||||
if best_cosine >= settings.relevance_threshold or fts_hits > 0:
|
||||
docs = select_documents(
|
||||
chunks, n=settings.top_n_docs, max_chars=settings.max_context_chars
|
||||
)
|
||||
docs = select_documents(chunks, n=settings.top_n_docs)
|
||||
return TurnPlan(
|
||||
best_cosine,
|
||||
fts_hits,
|
||||
@@ -144,7 +142,7 @@ def plan_turn(
|
||||
fts_hits,
|
||||
True,
|
||||
build_deflect_prompt(titles, notes=steering),
|
||||
select_documents(chunks, n=settings.top_n_docs, max_chars=settings.max_context_chars),
|
||||
select_documents(chunks, n=settings.top_n_docs),
|
||||
derive_suggestions(titles, settings.suggestions),
|
||||
len(steering),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user