Keep follow-ups on the open chat and send prompt history in order #85

Merged
westfarn merged 1 commits from fix/84-thread-followups into master 2026-10-25 06:05:07 -07:00
Owner

Summary

  • Closes #84.
  • Same-chat history now defaults on, and existing accounts are switched on. The account toggle stays an opt-out. Follow-ups such as "I don't know, why?" and "put that list in a table" can see the previous turn.
  • Grounded answers may use the conversation for follow-ups. Citations stay on facts that come from live sources. A pure follow-up skips web search; a follow-up that asks for a price or rating still searches.
  • Conversation prompts are loaded oldest-first (created, then id) for the model and for conversation_details. The current user turn is dropped from history by matching its text.
  • Display order of the bubbles is chat_web_app#136.

Test plan

  • manage.py test chat_backend.tests.test_services_llm chat_backend.tests.test_grounding_search.GroundingPrepassTestCase chat_backend.tests.test_views_conversations chat_backend.tests.test_models.CompanyAndUserTestCase chat_backend.tests.test_migration_graph chat_backend.tests.test_consumers.DatabaseHelperTestCase chat_backend.tests.test_services_rag
  • Apply migration 0036_enable_conversation_context.
  • Ask for a joke, then "I don't know, why?". The reply explains the joke and does not cite an unrelated page.
  • Ask for stroller options, then ask for that list in a table with prices and ratings. The table uses the products already named. Missing prices are called out as missing, not the list.
  • Turn "Remember this chat" off. The next reply ignores earlier turns. Turn it back on and a follow-up uses them again.
  • Reload a multi-turn chat. Bubbles stay oldest at the top.
## Summary - Closes #84. - Same-chat history now defaults on, and existing accounts are switched on. The account toggle stays an opt-out. Follow-ups such as "I don't know, why?" and "put that list in a table" can see the previous turn. - Grounded answers may use the conversation for follow-ups. Citations stay on facts that come from live sources. A pure follow-up skips web search; a follow-up that asks for a price or rating still searches. - Conversation prompts are loaded oldest-first (`created`, then `id`) for the model and for `conversation_details`. The current user turn is dropped from history by matching its text. - Display order of the bubbles is chat_web_app#136. ## Test plan - [ ] `manage.py test chat_backend.tests.test_services_llm chat_backend.tests.test_grounding_search.GroundingPrepassTestCase chat_backend.tests.test_views_conversations chat_backend.tests.test_models.CompanyAndUserTestCase chat_backend.tests.test_migration_graph chat_backend.tests.test_consumers.DatabaseHelperTestCase chat_backend.tests.test_services_rag` - [ ] Apply migration `0036_enable_conversation_context`. - [ ] Ask for a joke, then "I don't know, why?". The reply explains the joke and does not cite an unrelated page. - [ ] Ask for stroller options, then ask for that list in a table with prices and ratings. The table uses the products already named. Missing prices are called out as missing, not the list. - [ ] Turn "Remember this chat" off. The next reply ignores earlier turns. Turn it back on and a follow-up uses them again. - [ ] Reload a multi-turn chat. Bubbles stay oldest at the top.
westfarn added 1 commit 2026-10-25 06:04:23 -07:00
Keep follow-ups on the open chat and send prompt history in order.
CI / test (pull_request) Successful in 9s
Unit Tests / test (pull_request) Successful in 9s
41b5dbe832
Same-chat history defaulted off, and grounded answers were told to use live sources only, so a follow-up could not see the previous turn. Prompt rows were also loaded with no order.

Closes #84.
westfarn merged commit 331cff4730 into master 2026-10-25 06:05:07 -07:00
westfarn deleted branch fix/84-thread-followups 2026-10-25 06:05:07 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_backend#85