You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 5 - Conversation Continuity and Selection Semantics
Planning baseline version: 0.250.061
Status: Proposed
Depends on: Phases 1-4 for full behavior
Objective
Make source selection and follow-up behavior predictable across turns without unnecessary reprocessing.
Explicit selections are authoritative. When no current selection exists, conversation history should be used first; previously grounded sources are reauthorized and rerun only when fresh evidence is required.
Current Behavior to Reuse
Conversation metadata already persists last_grounded_document_refs, and Chat already has a history-only sufficiency assessment followed by authorized fallback search.
The remediation should extend that contract to native tabular evidence rather than add a second memory mechanism.
Selection Precedence
Current explicit selection (selection_mode: selected)
Analyze All Documents (selection_mode: all, Analyze only)
Current explicit selection must never be silently merged with stale prior sources unless the user asks to include both.
Follow-Up Decision Flow
flowchart TD
A[New prompt] --> B{Current explicit selection?}
B -- Yes --> C[Resolve and process selected manifest]
B -- No --> D{History sufficient?}
D -- Yes --> E[Answer from saved conversation evidence]
D -- No --> F[Load last grounded refs]
F --> G[Reauthorize current access and source versions]
G --> H[Classify sources by native engine]
H --> I[Run only engines needed for fresh evidence]
I --> J[Update grounding metadata]
Loading
Scope
1. Extend grounded references
Persist safe document-level fields needed for native routing:
document ID
scope and scope ID
file name/extension
source kind
source version when available
last engine used
evidence status
Do not persist raw query results or secret-bearing source descriptors in conversation metadata.
2. History sufficiency
Retain the existing assessment, but include whether the new question requires:
no document access
narrative retrieval
tabular recomputation
both engines
Examples requiring tabular recomputation:
new filters
new grouping/dimensions
fresh totals or comparisons
a question referring implicitly to the previously used table
Examples that may use history:
rephrasing the prior conclusion
asking for a shorter summary
asking what the previous result means
3. Authorization and source freshness
Before any historical source reuse:
revalidate conversation ownership
revalidate group membership/public visibility
resolve the current source version
fail or disclose stale evidence when the source changed
4. Selection UI/backend consistency
Send selection_mode explicitly. Panel visibility must not change source semantics.
Display a compact source-context indicator for the current turn when useful, but do not add instructional clutter to the chat response.
5. All Documents semantics
Chat/Search: relevance-bounded
Analyze: exhaustive authorized catalog within limits
Compare: explicit Source and Targets only
Reject ambiguous all requests for Compare rather than guessing.
Acceptance Criteria
A follow-up such as "now break that down by region" reuses and reauthorizes the prior table when no current selection exists.
A follow-up answerable from the previous response does not rerun tabular tools.
Selecting a new PDF supersedes the previously grounded table.
A changed or unauthorized prior source is not reused silently.
Current selection semantics are identical whether the panel is open or closed.
Analyze All Documents is exhaustive; Chat/Search All Documents is relevance-bounded.
Compare without explicit Source/Targets returns a clear validation error.
Tests
history-sufficient tabular follow-up
fresh tabular calculation follow-up
mixed prior grounding requiring both engines
explicit selection supersedes history
group membership revoked between turns
public workspace visibility revoked
source version changed between turns
no current selection and no grounded refs
standard/streaming parity
model/agent parity
selection panel open/closed parity
Rollout
Use enable_mixed_source_conversation_continuity. Start with explicitly grounded tabular follow-ups, then enable mixed prior-source reruns.
Rollback
Disable native-engine reruns while retaining existing history-only and search fallback behavior.
Exit Gate
Proceed when follow-up turns make deterministic, observable decisions between history reuse and engine rerun, with authorization tests for every scope.
Not in This Phase
Long-term semantic memory of raw table results
Automatic inclusion of sources older than the latest grounded set
Parent: #1055
Phase 5 - Conversation Continuity and Selection Semantics
Planning baseline version: 0.250.061
Status: Proposed
Depends on: Phases 1-4 for full behavior
Objective
Make source selection and follow-up behavior predictable across turns without unnecessary reprocessing.
Explicit selections are authoritative. When no current selection exists, conversation history should be used first; previously grounded sources are reauthorized and rerun only when fresh evidence is required.
Current Behavior to Reuse
Conversation metadata already persists
last_grounded_document_refs, and Chat already has a history-only sufficiency assessment followed by authorized fallback search.The remediation should extend that contract to native tabular evidence rather than add a second memory mechanism.
Selection Precedence
selection_mode: selected)selection_mode: all, Analyze only)selection_mode: history)selection_mode: relevance, Chat/Search)Current explicit selection must never be silently merged with stale prior sources unless the user asks to include both.
Follow-Up Decision Flow
flowchart TD A[New prompt] --> B{Current explicit selection?} B -- Yes --> C[Resolve and process selected manifest] B -- No --> D{History sufficient?} D -- Yes --> E[Answer from saved conversation evidence] D -- No --> F[Load last grounded refs] F --> G[Reauthorize current access and source versions] G --> H[Classify sources by native engine] H --> I[Run only engines needed for fresh evidence] I --> J[Update grounding metadata]Scope
1. Extend grounded references
Persist safe document-level fields needed for native routing:
Do not persist raw query results or secret-bearing source descriptors in conversation metadata.
2. History sufficiency
Retain the existing assessment, but include whether the new question requires:
Examples requiring tabular recomputation:
Examples that may use history:
3. Authorization and source freshness
Before any historical source reuse:
4. Selection UI/backend consistency
Send
selection_modeexplicitly. Panel visibility must not change source semantics.Display a compact source-context indicator for the current turn when useful, but do not add instructional clutter to the chat response.
5. All Documents semantics
Reject ambiguous
allrequests for Compare rather than guessing.Acceptance Criteria
Tests
Rollout
Use
enable_mixed_source_conversation_continuity. Start with explicitly grounded tabular follow-ups, then enable mixed prior-source reruns.Rollback
Disable native-engine reruns while retaining existing history-only and search fallback behavior.
Exit Gate
Proceed when follow-up turns make deterministic, observable decisions between history reuse and engine rerun, with authorization tests for every scope.
Not in This Phase