Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/featureType feature: a new function
Milestone
Description
Problem Statement
Distributed OpenTelemetry traces indicate ai.rag.ollama_embed_batch repeatedly encounters 15.0s ReadTimeout: timed out exceptions (75s+ total latency) during dense repository indexing, stalling RAG operations on overloaded local Ollama nodes.
Proposed Changes
- Dynamic batch partitioning in
devops_cli.ai.rag.embeddingsadapting batch size dynamically (halving from 32 down to 16, 8, 4 on latency degradation or timeout). - Exponential backoff with jitter on transient network timeouts.
- Pre-flight Valkey SHA-256 chunk cache checks before remote embedding dispatch.
- Automatic fallback to single-chunk requests when batches fail.
Acceptance Criteria
- Zero uncaught
ReadTimeoutexceptions during full workspace re-indexing. - Average batch latency reduced below 2.0s.
- 100% unit test coverage of batch adaptation logic in
tests/test_rag_embeddings.py.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(ai): resolve review feedback on fallback cache poisoning and quer…
feat(ai): adaptive embedding batch sizing circuit breaker and timeout…
feat(release): v0.2.19 (#217)