Fix mixed-source chat excerpt truncation, default system prompt suppression, bracketed citations, and Semantic Ranker quota fallback
Los mantenedores suelen responder en 1 día
@paullizer ya está trabajando en esto.
Desde el 29/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Issue
When Enhanced Citations is enabled (which derives enable_mixed_source_chat_search = True and persists it in Cosmos DB app_settings), chat retrieval, narrative/XML chunk fidelity, default system-prompt injection, and inline citation rendering experience several regressions across paullizer-react-v2-ui, main, and earlier branches sharing the same backend services:
default_system_promptSuppressed:route_backend_chats.pychecked whether anyrole == "system"message did not contain"retrieved document excerpts", causingmixed_source_handoff, chat-uploaded file/image messages, and other system augmentation messages to suppresssettings['default_system_prompt'](e.g., PLASO's persona and instructions).- Narrative & XML Search Excerpt Truncation (4,000 chars -> 1,024 / 512 bytes):
route_backend_chats.pyskippedbuild_search_augmentation_system_prompt(retrieved_content)wheneveris_mixed_source_chat_search_enabled(settings)wasTrue, leaving the model with only the JSONevidence_envelopespreview (where_make_json_safeand_bound_json_valuetruncated every chunk string to 1,024 / 512 bytes and omitted document metadata and(Source: ..., Page: ...) [#citation_id]strings). - Empty Content for Direct Chat File Uploads When Content Screening Is Off: Workspace-backed chat uploads (
file_content_source: "workspace") store no inlinefile_contenton the Cosmos message item, and_refresh_workspace_linked_history_messagereturned early whenSCREENING_FIELDwas absent, leavingfile_contentempty inbuild_conversation_history_segments. - Bracketed Chunk IDs (
[8ed56431_1]) Rendered as Raw Text: When models copied raw or 8-hex-prefix chunk IDs ([8ed56431_1],[15dce0d4_2; 8ed56431_2]) from JSON envelopes without a(Source: ...)prefix,citations.ts,chat-citations.js, andfunctions_citation_tracking.pydid not resolve them againsthybrid_citations. - Hard Failure on Azure AI Search Semantic Ranker Free Quota Exhaustion:
hybrid_searchhardcodedquery_type="semantic"without falling back toquery_type="simple"(vector + BM25 keyword search) after recording the service health warning.
Steps to Reproduce
- Enable Enhanced Citations in Admin Settings and configure a
default_system_prompt(e.g., PLASO instructions). - Index or upload an
.xml(or other narrative) document in chat and ask a question requiring full chunk details and inline citations. - Observe that
default_system_promptis omitted whenmixed_source_handoffor a chat file upload is present, narrative/XML chunks are truncated in the JSON envelope, and citations appear as bracketed IDs such as[8ed56431_1]or[15dce0d4_2; 8ed56431_2]. - Exceed the monthly free Semantic Ranker query quota on Azure AI Search and observe
hybrid_searchfailing instead of falling back to vector + keyword search.
Expected Behavior
default_system_promptis always preserved at the start of the prompt regardless of Enhanced Citations or augmentation/upload system messages.- Full narrative/XML search excerpts, metadata citations, and
(Source: ..., Page: ...) [#citation_id]markers are included in chat augmentation, and workspace-backed chat uploads hydrate their indexed chunk text when Content Screening is off. - Bracketed chunk IDs (
[8ed56431_1],[15dce0d4_2; 8ed56431_2]) resolve to inline citation chips/links and cited-source tracking. - When Semantic Ranker quota is exhausted,
hybrid_searchrecords the service-health warning and automatically falls back toquery_type="simple"vector + keyword search.
Actual Behavior
default_system_promptwas skipped whenmixed_source_handoffor file/image system messages existed.build_search_augmentation_system_promptwas skipped in mixed-source chat mode, leaving only 1,024/512-byte JSON envelope previews.- Workspace-backed chat file uploads had empty
file_contentin history when Content Screening was off. - Bracketed chunk IDs rendered as raw text instead of clickable citations.
- Semantic Ranker quota exhaustion caused
hybrid_searchto fail withSemanticSearchQuotaExceededError(HTTP 503 / empty context).
Impact
Affects RAG retrieval accuracy, XML and narrative document fidelity, persona/system-prompt determinism, and inline citation rendering across chat sessions.
Notes
Fixed in v0.261.392 (route_backend_chats.py, functions_mixed_source_orchestration.py, functions_search.py, functions_citation_tracking.py, citations.ts, chat-citations.js).
- Lenguaje dominante
- Python
- Estrellas
- 157
- Forks
- 117
- Merge medio
- 3 h 6 min
- PR fusionados (30 d)
- 219
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/simplechat
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/simplechat#1491 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/simplechat#1370 ·
Los mantenedores suelen responder en 1 día
-
Add support for extracting comments from Word documents (.docx, .docm, .doc, .dotx)Posiblemente ocupada @paullizer la tomó hace 3 días. Abiertoenhancement P2
microsoft/simplechat#1850 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
V2: Preserve explicit reasoning None across existing tool pathsPosiblemente ocupada @paullizer la tomó hace 3 días. Abiertobug P1
microsoft/simplechat#1846 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
V2: Make Azure OpenAI v1 routing and API-version guidance consistentPosiblemente ocupada @paullizer la tomó hace 3 días. Abiertobug P1
microsoft/simplechat#1845 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/simplechat
Issues similares
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Bug] PROPOSE docs promise approval before saving, but save_learning has no confirmation flagAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are droppedPosiblemente ocupada @sohom-cs la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Arize-ai/openinference#4199 · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
MichaelYcJo/SpecSeal#1192 ·