Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.
HyDE (Hypothetical Document Embeddings) é a técnica clássica que gera uma resposta hipotética para a pergunta do usuário e usa essa resposta como signal adicional de retrieval. No ChatCLI, HyDE opera em duas fases complementares: 3a expande keywords via hipótese LLM, 3b adiciona busca vetorial por cosseno.
HyDE é opt-in (CHATCLI_QUALITY_HYDE_ENABLED=true) para manter o steady-state sem custo adicional. Phase 3a custa +1 LLM call cheap; Phase 3b requer configurar um embedding provider.
O problema que HyDE resolve
O retrieval de memory.Fact pré-pipeline era keyword-only: o scorer bate tokens extraídos de mensagens recentes contra tags e content dos facts armazenados. Funciona bem quando o vocabulário bate exatamente — falha quando o usuário usa sinônimos ou faz perguntas abstratas.Exemplo do gap:
Sem HyDE
Com HyDE 3a
Com HyDE 3b
Usuário: como fazer X em Go?
Keywords extraídas: [fazer, go]
Fact armazenado: "use goroutines for concurrency in X pipelines" Match: ❌ — “fazer” e “go” não aparecem literalmente no fact.
Usuário: como fazer X em Go?
Hipótese LLM: "In Go you would use goroutines and channels for X, leveraging the concurrency primitives..."
Keywords expandidas: [fazer, go, goroutines, channels, concurrency, primitives] Match: ✅
Hipótese → embed (1024 dim via Voyage) → cosine search no vector store → top-3 facts semanticamente próximos. Match: ✅ — mesmo sem nenhum keyword em comum.
Prompt: “Write a 2-4 sentence plausible answer that uses the technical nouns that would appear in any matching note. Bilingual if the query mixes languages.”
4
ExtractKeywords da hipótese
O mesmo extractor já usado no chat mode (stop words en+pt, min 3 chars).
5
Merge unique + lower-case
Keywords originais + top-N da hipótese, cap configurável via CHATCLI_QUALITY_HYDE_NUM_KEYWORDS (default 5).
6
FactIndex.Search usa o set expandido
Scorer keyword-based existente opera sobre hints mais rico → recall muito maior.
Phase 3a funciona sem configurar embedding provider. É o default recomendado se o custo de +1 LLM call leve é aceitável.
Phase 3b — Vector embeddings + ranking fundido
Adiciona busca por cosine similarity sobre embeddings de facts — e, desde a refatoração de ranking, funde o score de cosseno com os sinais lexical e temporal num único ranking.
O que mudou (PR #1027): antes, os hits vetoriais eram dissolvidos de volta em keywords e o score de cosseno era descartado — pagava-se uma chamada de embedding e jogava-se fora justamente o sinal semântico. Agora o cosseno flui direto para o ranker fundido SearchBlended, então um fato achado só por paráfrase (zero overlap lexical) consegue rankear.
Três sinais independentes e complementares, cada um normalizado min-max sobre o conjunto de candidatos antes da soma ponderada:
Sinal
Origem
Captura
semantic
cosseno do vector store
sinonímia, paráfrase
lexical
overlap de keyword/tag
termos exatos, identificadores, nomes de arquivo
temporal
decaimento por recência × frequência de acesso
o que o usuário realmente usa
Pesos default (DefaultRankWeights): semantic 0.55 · lexical 0.30 · temporal 0.15 — semantic-first, porque a chamada de embedding já foi paga. A fusão é aditiva (não multiplicativa) de propósito: um fato com cosseno alto e zero keyword ainda rankeia — um produto o zeraria. A normalização min-max é o que torna os pesos provider-agnostic: cosseno Voyage 1024-d e OpenAI 1536-d caem ambos em [0,1] após normalizar.
Floor de cosseno (MinCosineScore, default 0.25): embeddings sobre texto normalizado são quase sempre fracamente positivos, então o antigo corte em > 0 admitia ruído quase-ortogonal. O floor mantém só fatos genuinamente relacionados no top-K.
Por quê Voyage: é o provider recomendado pela Anthropic para workflows Claude, tem alta qualidade/$ em retrieval, e o modelo default (voyage-4, 1024-dim) é o tier general-purpose da família voyage-4 — mesmo preço do voyage-3, estritamente melhor. voyage-4-large (flagship de qualidade), voyage-4-lite (mais barato) e voyage-code-4 (retrieval de código) compartilham o mesmo espaço de embedding.
export CHATCLI_QUALITY_HYDE_ENABLED=trueexport CHATCLI_QUALITY_HYDE_USE_VECTORS=trueexport CHATCLI_EMBED_PROVIDER=openaiexport OPENAI_API_KEY=sk-...# Opcional: escolher modelo e dimensão customexport CHATCLI_EMBED_MODEL=text-embedding-3-smallexport CHATCLI_EMBED_DIMENSIONS=512 # pode reduzir para economizar storage
Modelos:text-embedding-3-small (default, 1536-dim, $0.02/1M tokens) ou text-embedding-3-large (3072-dim, melhor qualidade). A dimensão nativa é detectada automaticamente a partir do modelo — só sete CHATCLI_EMBED_DIMENSIONS se quiser truncar via Matryoshka (ex.: 512 para reduzir storage).
export CHATCLI_QUALITY_HYDE_ENABLED=trueexport CHATCLI_QUALITY_HYDE_USE_VECTORS=trueexport CHATCLI_EMBED_PROVIDER=googleexport GEMINI_API_KEY=AIza...# Opcional: escolher modelo e dimensão truncadaexport CHATCLI_EMBED_MODEL=gemini-embedding-2export CHATCLI_EMBED_DIMENSIONS=1536 # 128-3072 via Matryoshka
Modelos:gemini-embedding-2 (default, 3072-dim nativo, GA, multimodal-ready, com free tier) ou o antigo gemini-embedding-001 (superado; desliga em 14/05/2028). Batches vão via :batchEmbedContents; dimensões truncadas são L2-normalizadas localmente, então qualquer CHATCLI_EMBED_DIMENSIONS entre 128 e 3072 é seguro para similaridade de cosseno.
export CHATCLI_QUALITY_HYDE_ENABLED=trueexport CHATCLI_QUALITY_HYDE_USE_VECTORS=trueexport CHATCLI_EMBED_PROVIDER=bedrock# Reusa a credentials chain do chat client — sem nova API key.# Defina region/profile se ainda não estão no ambiente.export BEDROCK_REGION=us-east-1export AWS_PROFILE=meu-profile # opcional# Opcional: escolher modeloexport CHATCLI_EMBED_MODEL=amazon.titan-embed-text-v2:0 # defaultexport CHATCLI_EMBED_DIMENSIONS=1024 # Titan v2: 256/512/1024
Por quê Bedrock: mesma cadeia de credenciais AWS do chat — billing único, compliance AWS (CloudTrail, guardrails), VPC endpoints. Ideal pra empresas que já têm chat rodando via Bedrock e querem retrieval no mesmo perímetro.Famílias suportadas:
Model ID
Família
Dim suportadas
Batch nativo
amazon.titan-embed-text-v2:0 (default)
Titan v2
256, 512, 1024
Não — paralelizado com pool de 8 workers
amazon.titan-embed-text-v1
Titan v1
1536 (fixo)
Não — paralelizado
cohere.embed-english-v3
Cohere v3 (en)
1024 (fixo)
Sim — uma chamada por batch
cohere.embed-multilingual-v3
Cohere v3 (multi)
1024 (fixo)
Sim — uma chamada por batch
cohere.embed-v4:0
Cohere v4 (multi, ctx 128K)
1536 (default)
Sim — uma chamada por batch
amazon.nova-2-multimodal-embeddings-v1:0
Nova MME
256, 384, 1024, 3072 (default 3072)
Não — paralelizado com pool de 8 workers
A dispatch entre Titan e Cohere é auto pelo prefixo do model id. CHATCLI_EMBED_DIMENSIONS só vale pra Titan v2 (256/512/1024); valores inválidos são rejeitados no NewBedrock antes de qualquer call AWS.Sem cobertura no Converse API: embeddings só estão em InvokeModel, então cada família mantém seu body schema dedicado — diferente do chat onde Converse cobre quase tudo.
Troca a quente via /reload: mudar CHATCLI_EMBED_PROVIDER / CHATCLI_EMBED_MODEL / CHATCLI_EMBED_DIMENSIONS no .env e rodar /reload reconstrói o provider na hora — re-conectando o retrieval semântico do /context --rag e o vector index da memória, sem reiniciar o ChatCLI. O índice auto-migra se provider/dimensão mudarem.
Veja AWS Bedrock pra config completa da credentials chain (SSO, IAM role, proxy corporativo, VPC endpoint).
Se CHATCLI_EMBED_PROVIDER não está setado, o NullProvider é retornado. Embed() retorna erro — o código chama embedding.IsNull(p) antes para desviar para keyword-only. Zero surpresas, zero falhas silenciosas.
Vector store pure-Go — primitivo genérico vindex
Sem CGO, sem SQLite-vec, sem dependências externas. Só float32[] + cosseno + persistência JSON em ~/.chatcli/memory/vector_index.json.
O índice cosseno vive num pacote genérico e reutilizável, llm/embedding/vindex, extraído quando um segundo consumidor (o retrieval semântico de /context) apareceu. O memory é só um adapter fino sobre ele — sem máquina vetorial duplicada por pacote:
// llm/embedding/vindex — o primitivo único e agnósticotype Index struct { /* provider, dim, entries map[string][]float32, path */ }func (x *Index) Upsert(ctx, items map[string]string) errorfunc (x *Index) Search(query []float32, k int, minScore float64) []Hit // top-K via min-heapfunc (x *Index) Prune(keep map[string]struct{}) // evita servir vetor obsoleto// cli/workspace/memory/vector_store.go — adapter de domínio "fact"type VectorIndex struct { idx *vindex.Index; provider embedding.Provider }type ScoredFact struct { ID string; Score float64 }
A seleção top-K usa um min-heap O(n log k) (não full-sort O(n log n)), então o custo escala com k, não com o tamanho do corpus — o teto de escala deixa de ser “centenas de facts”. Para o caso típico do chatcli a busca linear completa em microssegundos; sem HNSW ou IVFFlat.
Auto-migração de provider/dimensão
Trocar de provider ou dimensão (Voyage 1024 → OpenAI 1536, ou voyage→cohere no mesmo 1024) não exige mais rm manual. No load, o índice detecta o mismatch — de dimensão (cosseno entre arities diferentes é indefinido) ou de provider (dois espaços de embedding distintos não são comparáveis, mesmo na mesma dimensão) — e auto-limpa o cache, removendo o arquivo para o backfill repopular:
WARN vindex provider changed — auto-clearing for re-embed on_disk_provider=voyage provider=cohereWARN vindex dimension mismatch — auto-clearing for re-embed on_disk_dim=1024 provider_dim=1536
O caso provider→provider no mesmo dim (ex.: voyage 1024 → cohere 1024) antes era silenciosamente servido como lixo — o cosseno entre espaços diferentes não tem sentido. Agora é detectado e re-embeddado.
Lazy backfill
Ao retrieve uma fact, se ela não tem vetor (fact pré-existe à ativação de embeddings), o index spawna goroutine detached para embedar as top-500 facts visíveis:
O backfill é bounded e configurável: no máximo Config.BackfillBatchMax facts por retrieve (default 500). Com Voyage (~0.05/Mtokens)issocustacercadeUS 0,001 num cold cache cheio. Em uma sessão normal, a maioria do index fica embeddado já na primeira interação.
O tool @embed para o agent
O backend de embeddings também é exposto diretamente ao modelo como o tool @embed (modos agent/coder), do mesmo jeito que o @image expõe geração de imagem:
<tool_call name="@embed" args='{"cmd":"similarity","args":{"a":"resetar uma senha","b":"recuperar acesso à conta"}}' />
Subcomando
Propósito
similarity {a, b}
similaridade de cosseno entre dois textos, em [-1, 1]
rank {query, candidates, k?}
ordena textos candidatos por relevância semântica a uma query
text {text|texts, out?}
embedda textos; com out, salva JSONL {index, text, embedding} para pipelines externos
status
mostra provider, modelo e dimensão
Usa a mesma configuração CHATCLI_EMBED_PROVIDER descrita acima. Para RAG persistente sobre documentos, o modelo é direcionado ao @context (construir/atachar base de conhecimento) + @knowledge (consultar) — o @embed cobre as operações semânticas ad-hoc que não precisam de índice.
Avaliação — provando o retrieval (não supondo)
Antes não havia como medir se o retrieval era bom. Agora há um harness de avaliação dependency-free em cli/workspace/memory/eval — métricas padrão de IR macro-averaged:
Métrica
O que mede
recall@k
fração dos facts relevantes recuperados no top-k
precision@k
fração do top-k que era relevante
MRR
rank recíproco médio do primeiro acerto
nDCG@k
ganho cumulativo descontado normalizado
O A/B versionado (em ranking_test.go, com um provider de embedding determinístico) compara keyword-only vs. ranking fundido sobre queries que usam sinônimos ausentes do texto dos facts:
O harness roda igual em CI (provider determinístico, reproduzível) ou contra um backend real — ele nunca importa um provider, então fica neutro entre os 14 suportados. É o que transforma “parece bom” em “é bom, medido”, e guarda contra regressões.
Tunables de ranking (sem novos env vars)
Os parâmetros do ranking fundido vivem como campos de Config com defaults fortes — não foram criados novos env vars (e os CHATCLI_MEMORY_* que já existiam, antes ignorados no caminho estruturado, agora são aplicados via ConfigFromEnv + clamp):
Campo Config
Default
O que controla
RankWeights
{0.55, 0.30, 0.15}
pesos semantic / lexical / temporal
MinCosineScore
0.25
floor de cosseno no top-K
VectorTopK
12
candidatos vetoriais por query
BackfillBatchMax
500
teto de facts embeddados por retrieve
Configuração completa
Env var
Default
O que faz
CHATCLI_QUALITY_HYDE_ENABLED
false
Master switch (phase 3a)
CHATCLI_QUALITY_HYDE_USE_VECTORS
false
Liga phase 3b (requer provider)
CHATCLI_QUALITY_HYDE_NUM_KEYWORDS
5
Cap de keywords da hipótese em phase 3a
CHATCLI_EMBED_PROVIDER
—
voyage / openai / bedrock / null — única fonte de verdade para selecionar o provider
HyDE amplifica o valor de Reflexion: as lições persistidas pela #3 são recuperadas com muito mais recall quando a próxima tarefa não usa exatamente as mesmas keywords. Workflow:
1
Turn 1: refactor auth.go falha (timeout)
Reflexion persiste lesson: "use Edit tool for large files", tags [go, refactor, edit-tool].
2
Turn 5 (dias depois): 'me ajuda a dividir pkg/engine'
Query não contém refactor ou edit. Keyword-only perderia a lesson.
3
HyDE 3a gera hipótese
"To split a Go package, identify logical groupings and use refactor patterns with Edit tool for surgical changes..."
Keywords extraídas: [split, package, refactor, edit, patterns, …]
4
Match!
Lesson aparece no system prompt. Coder escolhe Edit ao invés de write de primeira.
Caveats e tuning
Token cost de phase 3a: ~200 tokens por turn de retrieval. Em workflows com muitos turns de leitura, o custo acumula. Use CHATCLI_QUALITY_HYDE_NUM_KEYWORDS=3 para budget mais apertado.
Privacy: a query do usuário é enviada ao provider de embedding. Para workloads sensíveis em ambientes corporativos, Bedrock é o caminho preferido — fica dentro do perímetro AWS (CloudTrail, VPC endpoint, IAM). Para workloads locais sem rede, considere self-host (roadmap: provider Ollama-embedding).
Fallback gracioso: se o LLM fail ou o provider embedding retornar erro, o retrieval cai para keyword-only silenciosamente. Nenhum turn é abortado por falha de HyDE.
Leia também
#3 Reflexion
As lições que HyDE recupera com mais recall.
Bootstrap Memory
A camada embaixo: como memory.Fact é populada e mantida.
Persistent Context
/context attach para contextos explícitos de arquivos.
Configuração completa
Todos os env e slashes.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"ChatCLI","description":"Official ChatCLI documentation — a multi-provider AI CLI with agent mode, gRPC server and Kubernetes operator.","colors":{"primary":"#0F766E","light":"#2DD4BF","dark":"#0D9488"},"logo":{"light":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=965a0feb9bd2f65a11b3c486e2488101","dark":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=ac3f6607cdea0039d0b66b80f700e512","href":"/"},"favicon":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/favicon.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=c774e29d1b243b7c3b4bf5e173fef299","api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#F7F7F5","dark":"#0E0F10"}},"navbar":{"links":[{"href":"/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Install","href":"/start/installation"}},"footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Resources","items":[{"label":"Documentation","href":"/"},{"label":"Cookbook","href":"/cookbook/agent-refactoring"},{"label":"API Reference","href":"/reference/api/overview"}]},{"header":"Community","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribution","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"search":{"prompt":"Search"},"seo":{"metatags":{"og:type":"website","og:site_name":"ChatCLI Documentation","twitter:card":"summary_large_image","twitter:site":"@diillson"}},"fonts":{"heading":{"family":"Geist","weight":600},"body":{"family":"Geist"}},"styling":{"eyebrows":"section","codeblocks":"system","latex":true},"integrations":{},"errors":{"404":{"redirect":false}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"pt-BR","footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Recursos","items":[{"label":"Documentação","href":"/pt"},{"label":"Cookbook","href":"/pt/cookbook/agent-refactoring"},{"label":"API Reference","href":"/pt/reference/api/overview"}]},{"header":"Comunidade","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribuição","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"navbar":{"links":[{"href":"/pt/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/pt/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Instalar","href":"/pt/start/installation"}},"href":"pt"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"encom","hasAudioNarration":false,"actualSubdomain":"encom","customDomains":["chatcli.edilsonfreitas.com"],"gitSource":{"type":"github","owner":"diillson","repo":"chatcli.ai","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b044e5e4ca26305da2d3ddc","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"en","tag":"Documentation","count":206},{"language":"pt-BR","tag":"Documentação","count":206},{"language":"en","tag":"Reference","count":55},{"language":"pt-BR","tag":"Referência","count":55},{"language":"en","tag":"REST API","count":50},{"language":"pt-BR","tag":"REST API","count":50},{"language":"en","tag":"Agents","count":20},{"language":"pt-BR","tag":"Agentes","count":20},{"language":"en","tag":"Context \u0026 memory","count":16},{"language":"en","tag":"Cookbook","count":16},{"language":"pt-BR","tag":"Contexto e memória","count":16},{"language":"pt-BR","tag":"Cookbook","count":16},{"language":"en","tag":"Using ChatCLI","count":15},{"language":"pt-BR","tag":"Usando o ChatCLI","count":15},{"language":"en","tag":"Kubernetes \u0026 AIOps","count":14},{"language":"pt-BR","tag":"Kubernetes e AIOps","count":14},{"language":"en","tag":"Tools","count":13},{"language":"pt-BR","tag":"Ferramentas","count":13},{"language":"en","tag":"Channels \u0026 gateway","count":11},{"language":"pt-BR","tag":"Canais e gateway","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--cc-accent: #0f766e;--cc-accent-strong: #115e59;--cc-accent-soft: rgb(13 148 136 / 0.08);--cc-accent-ring: rgb(13 148 136 / 0.32);--cc-glow: rgb(20 184 166 / 0.07);--cc-text: #17171a;--cc-text-2: #46464e;--cc-text-3: #6b6b74;--cc-surface: #ffffff;--cc-surface-2: #f1f0ed;--cc-code-bg: #f3f2ef;--cc-border: rgb(23 23 26 / 0.10);--cc-border-strong: rgb(23 23 26 / 0.18);--cc-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.10);--cc-radius: 0.75rem;--cc-radius-sm: 0.5rem;--cc-mono: \"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}html.dark{--cc-accent: #2dd4bf;--cc-accent-strong: #5eead4;--cc-accent-soft: rgb(45 212 191 / 0.12);--cc-accent-ring: rgb(45 212 191 / 0.40);--cc-glow: rgb(45 212 191 / 0.08);--cc-text: #ededed;--cc-text-2: #bcbcc4;--cc-text-3: #8e8e96;--cc-surface: #161719;--cc-surface-2: #1c1d20;--cc-code-bg: #121314;--cc-border: rgb(154 154 162 / 0.16);--cc-border-strong: rgb(154 154 162 / 0.28);--cc-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 12px 32px -16px rgb(0 0 0 / 0.6)}::selection{background:var(--cc-accent-ring)}body::before{content:\"\";position:fixed;inset:0 0 auto auto;width:60vw;height:32rem;pointer-events:none;z-index:0;background:radial-gradient(ellipse at 75% 0%, var(--cc-glow), transparent 65%)}#navbar{backdrop-filter:saturate(140%) blur(12px)}#navbar #search-bar-entry{border-radius:var(--cc-radius-sm);border-color:var(--cc-border);background:var(--cc-surface);box-shadow:none}#topbar-cta-button a{border-radius:var(--cc-radius-sm);font-weight:500}#sidebar-title{font-size:0.75rem;font-weight:500;letter-spacing:0.01em;color:var(--cc-text-3)}#sidebar #navigation-items a{font-size:0.875rem;border-radius:var(--cc-radius-sm)}#sidebar #navigation-items a.text-primary,#sidebar #navigation-items a[class*=\"bg-primary\"]{background:var(--cc-accent-soft);color:var(--cc-accent);text-shadow:none;font-weight:500}.nav-tag-pill-text{font-family:var(--cc-mono);font-weight:500!important;letter-spacing:0.02em}#header .eyebrow{color:var(--cc-accent);font-size:0.8125rem;font-weight:500}#page-title{font-size:clamp(2rem, 3.2vw, 2.5rem);font-weight:600;letter-spacing:-0.025em;line-height:1.15}#header .prose{color:var(--cc-text-2)}#page-context-menu-button,#page-context-menu button{border-radius:var(--cc-radius-sm)}#content{font-size:0.975rem}#content h2{letter-spacing:-0.02em;font-weight:600}#content h3{letter-spacing:-0.01em;font-weight:600}#content a:not(.card):not([class*=\"cc-\"]){text-decoration-color:var(--cc-accent-ring);text-underline-offset:3px}#content a:not(.card):not([class*=\"cc-\"]):hover{text-decoration-color:var(--cc-accent)}code,pre,kbd,.font-mono{font-family:var(--cc-mono)!important}#content :not(pre)>code{font-size:0.85em;padding:0.1em 0.38em;border-radius:0.375rem;border:1px solid var(--cc-border);background:var(--cc-surface-2)}.code-block,[data-component-part=\"code-block-root\"]{border-radius:var(--cc-radius)!important;border-color:var(--cc-border)!important}.code-block-background{border-radius:var(--cc-radius)!important}html.dark .code-block-background{background:var(--cc-code-bg)!important}#content table{font-size:0.9rem}#content table thead th{font-size:0.8125rem;font-weight:600;color:var(--cc-text-2);border-bottom:1px solid var(--cc-border-strong)}#content table td{border-color:var(--cc-border)}.callout{border-radius:var(--cc-radius)!important;border:1px solid var(--cc-border)!important;background:var(--cc-surface)!important;box-shadow:var(--cc-shadow)}.callout>div:last-child,.callout>div:last-child *{color:var(--cc-text-2)}.callout>div:last-child strong,.callout>div:last-child code{color:var(--cc-text)!important}.callout[data-callout-type=\"warning\"]{border-left:3px solid #f59e0b!important}.callout[data-callout-type=\"danger\"]{border-left:3px solid #ef4444!important}.card{border-radius:var(--cc-radius)!important;border-color:var(--cc-border)!important;background:var(--cc-surface)!important;transition:border-color 160ms ease, transform 160ms ease}a.card:hover{border-color:var(--cc-accent-ring)!important}.card [data-component-part=\"card-icon\"]{display:grid;place-items:center;width:2.25rem;height:2.25rem;margin-bottom:0.25rem;border-radius:var(--cc-radius-sm);border:1px solid var(--cc-border);background:var(--cc-surface-2)}.card [data-component-part=\"card-icon\"] svg{width:1rem!important;height:1rem!important;background-color:var(--cc-accent)!important}.steps [data-component-part=\"step-number\"]>div{background:var(--cc-surface)!important;box-shadow:0 0 0 1px var(--cc-accent-ring);color:var(--cc-accent)!important;font-family:var(--cc-mono)}[role=\"tablist\"] button[aria-selected=\"true\"],[role=\"tablist\"] [data-state=\"active\"]{color:var(--cc-accent)!important;border-color:var(--cc-accent)!important}#content-area:has([data-chatcli-banner]) #header .eyebrow,#content-area:has([data-chatcli-banner]) #page-title,#content-area:has([data-chatcli-banner]) #header .prose,#content-area:has([data-chatcli-banner]) #header{display:none}#content-area:has([data-chatcli-banner]) #content{margin-top:0}.chatcli-banner{margin:3rem 0 0.75rem}.chatcli-banner-art{--cb-a: #0d9488;--cb-b: #0891b2;--cb-c: #2563eb;--cb-edge: rgb(23 23 26 / 0.28);--cb-glow: rgb(13 148 136 / 0.18);display:block;width:min(100%, 30rem);height:auto;overflow:visible}html.dark .chatcli-banner-art{--cb-a: #2dd4bf;--cb-b: #22d3ee;--cb-c: #60a5fa;--cb-edge: rgb(237 237 237 / 0.22);--cb-glow: rgb(45 212 191 / 0.34)}.chatcli-banner .cb-fills rect{shape-rendering:crispEdges}.chatcli-banner .cb-fills{filter:drop-shadow(0 0 14px var(--cb-glow))}.chatcli-banner .cb-edges path{fill:none;stroke:var(--cb-edge);stroke-width:0.55;stroke-linecap:square}.cb-prompt{margin:0 0 1.25rem;font-family:var(--cc-mono);font-size:0.95rem;color:var(--cc-text-2)}.cb-prompt-sign{color:var(--cc-accent)}.cb-cursor{display:inline-block;width:0.55em;height:1.1em;margin-left:0.3em;vertical-align:-0.18em;background:var(--cc-accent);animation:cb-blink 1.1s steps(1) infinite}@keyframes cb-blink{50%{opacity:0}}@media (prefers-reduced-motion: reduce){.cb-cursor{animation:none}}.chatcli-banner-tagline{font-size:1.125rem;line-height:1.6;margin:0 0 2rem;max-width:44rem;color:var(--cc-text-2)}.chatcli-banner-tagline strong{color:var(--cc-text);font-weight:500}a.cc-release{display:flex;align-items:center;gap:0.75rem;padding:0.85rem 1.1rem;margin:0 0 1.25rem;border:1px solid var(--cc-border);border-radius:var(--cc-radius);background:var(--cc-surface);color:var(--cc-text-2);font-size:0.875rem;text-decoration:none!important;border-bottom-width:1px;transition:border-color 160ms ease}a.cc-release:hover{border-color:var(--cc-accent-ring)}.cc-release-label{color:var(--cc-text-3);white-space:nowrap}.cc-release-version{display:inline-flex;align-items:center;gap:0.4rem;font-weight:600;color:var(--cc-text);white-space:nowrap}.cc-release-version::before{content:\"\";width:0.4rem;height:0.4rem;border-radius:999px;background:var(--cc-live);box-shadow:0 0 0 3px var(--cc-live-soft)}.cc-release-summary{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cc-release-cta{font-weight:500;color:var(--cc-text);white-space:nowrap}.cc-entry{margin:0 0 3rem}.cc-entry>div{gap:0!important;border:1px solid var(--cc-border);border-radius:var(--cc-radius);overflow:hidden;background:var(--cc-surface)}.cc-entry .card{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;height:100%}.cc-entry .card:hover{background:var(--cc-accent-soft)!important}@media (min-width: 1024px){.cc-entry .card{border-left:1px solid var(--cc-border)!important}.cc-entry>div>:first-child .card,.cc-entry>div>.card:first-child{border-left:0!important}}@media (max-width: 1023px){.cc-entry .card{border-top:1px solid var(--cc-border)!important}.cc-entry>div>:first-child .card,.cc-entry>div>.card:first-child{border-top:0!important}a.cc-release{flex-wrap:wrap}.cc-release-summary{flex-basis:100%;white-space:normal}}.cc-release-meta{display:flex;flex-wrap:wrap;gap:0.5rem 1.25rem;margin:0 0 1.5rem;font-size:0.875rem;color:var(--cc-text-3)}.cc-release-meta a{color:var(--cc-text-2)!important}.cc-scope{display:inline-block;margin-right:0.35rem;padding:0.05rem 0.4rem;border-radius:0.375rem;border:1px solid var(--cc-border);background:var(--cc-surface-2);font-family:var(--cc-mono);font-size:0.78em;color:var(--cc-text-2);vertical-align:0.08em}a.cc-scope{text-decoration:none!important;color:var(--cc-accent)!important}.cc-refs{font-size:0.85em;color:var(--cc-text-3);white-space:nowrap}.cc-refs a{color:var(--cc-text-3)!important}html{--cc-live: #15803d;--cc-live-soft: rgb(21 128 61 / 0.10)}html.dark{--cc-live: #4ade80;--cc-live-soft: rgb(74 222 128 / 0.12)}.nav-tag-pill-text[data-nav-tag^=\"v\"],.nav-tag-pill-text[data-nav-tag=\"Latest\"],.nav-tag-pill-text[data-nav-tag=\"Mais recente\"]{display:inline-flex;align-items:center;gap:0.3rem;color:var(--cc-live)!important;background:var(--cc-live-soft)!important}.nav-tag-pill-text[data-nav-tag^=\"v\"]::before,.nav-tag-pill-text[data-nav-tag=\"Latest\"]::before,.nav-tag-pill-text[data-nav-tag=\"Mais recente\"]::before{content:\"\";width:0.35rem;height:0.35rem;border-radius:999px;background:currentColor}.cc-nav-back{display:flex;align-items:center;gap:0.6rem;width:100%;margin:0 0 1rem;padding:0.6rem 0.85rem;border:1px solid var(--cc-border);border-radius:var(--cc-radius-sm);background:var(--cc-surface);color:var(--cc-text);font-size:0.875rem;font-weight:600;text-align:left;cursor:pointer;transition:border-color 160ms ease, background 160ms ease}.cc-nav-back[hidden]{display:none}.cc-nav-back:hover{border-color:var(--cc-accent-ring)}.cc-nav-back svg{flex:none;color:var(--cc-text-3)}#navigation-items[data-cc-focus]>div:not(:has([data-cc-focused])){display:none}#navigation-items[data-cc-focus]>div:has([data-cc-focused]){margin-top:0}#navigation-items[data-cc-focus]>div:has([data-cc-focused])>:not(ul){display:none}#navigation-items[data-cc-focus] ul.sidebar-group>li:not([data-cc-focused]){display:none}#navigation-items[data-cc-focus] [data-cc-focused]>button{display:none}#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>a,#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>button{padding-left:1rem!important}#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>ul a,#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>ul button{padding-left:1.75rem!important}#navigation-items.cc-nav-in{animation:cc-nav-in 220ms cubic-bezier(0.23, 1, 0.32, 1)}#navigation-items.cc-nav-out{animation:cc-nav-out 220ms cubic-bezier(0.23, 1, 0.32, 1)}@keyframes cc-nav-in{from{opacity:0;transform:translateX(18px)}}@keyframes cc-nav-out{from{opacity:0;transform:translateX(-18px)}}@media (prefers-reduced-motion: reduce){#navigation-items.cc-nav-in,#navigation-items.cc-nav-out{animation:none}}.cc-channels{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:0.85rem;margin:1.25rem 0 2rem}@media (max-width: 900px){.cc-channels{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (max-width: 520px){.cc-channels{grid-template-columns:1fr}}a.cc-channel{display:flex;align-items:center;gap:0.85rem;padding:1rem 1.1rem;border:1px solid var(--cc-border);border-radius:var(--cc-radius);background:var(--cc-surface);color:var(--cc-text)!important;font-weight:500;font-size:0.95rem;text-decoration:none!important;transition:border-color 160ms ease, transform 160ms ease}a.cc-channel:hover{border-color:var(--cc-accent-ring)}.cc-channel-icon{display:grid;place-items:center;flex:none;width:1.6rem;height:1.6rem}.cc-channel-icon svg{width:1.45rem;height:1.45rem}.cc-channel-name{flex:1;min-width:0}.cc-channel-arrow{flex:none;width:1rem;height:1rem;color:var(--cc-text-3);transition:transform 160ms ease, color 160ms ease}a.cc-channel:hover .cc-channel-arrow{color:var(--cc-text);transform:translateX(2px)}.cc-ch-telegram{color:#26a5e4}.cc-ch-slack{color:#e01e5a}.cc-ch-discord{color:#5865f2}.cc-ch-whatsapp{color:#25d366}.cc-ch-webhook{color:var(--cc-accent)}.cc-ch-all{color:var(--cc-text-3)}html.dark .cc-ch-discord{color:#8991ff}#sidebar #navigation-items a,#sidebar #navigation-items button{font-size:0.8125rem!important;line-height:1.35rem;padding-top:0.3rem!important;padding-bottom:0.3rem!important}#sidebar #navigation-items svg{width:0.95rem;height:0.95rem}.cc-nav-back{font-size:0.8125rem}#table-of-contents,#table-of-contents a,#table-of-contents li{font-size:0.8125rem!important;line-height:1.3rem}#table-of-contents a{padding-top:0.2rem;padding-bottom:0.2rem}#content-container:has([data-chatcli-banner]){max-width:min(100%, 1440px)!important}#content-container:has([data-chatcli-banner]) #content-area{max-width:none!important}#navigation-items li[data-title]:not([id])>button>div:not(:has(svg)){flex:1 1 auto;min-width:0;text-align:left}body::after{content:\"\";position:absolute;top:0;right:0;z-index:0;width:min(78vw, 1100px);height:440px;pointer-events:none;background:linear-gradient(225deg, #2dd4bf 0%, #22d3ee 40%, #60a5fa 75%, transparent 100%);-webkit-mask:url(\"/images/hero-halftone.svg\") right top / 100% 100% no-repeat;mask:url(\"/images/hero-halftone.svg\") right top / 100% 100% no-repeat;opacity:0.6}html:not(.dark) body::after{background:linear-gradient(225deg, #0d9488 0%, #0891b2 40%, #2563eb 75%, transparent 100%);opacity:0.38}@media (max-width: 760px){body::after{width:100vw;height:280px;opacity:0.4}html:not(.dark) body::after{opacity:0.26}}#navigation-items li[data-title]:not([id])>button{position:relative}#navigation-items li[data-title]:not([id])>button>:last-child svg,#navigation-items li[data-title]:not([id])>button>svg:last-child{visibility:hidden}#navigation-items li[data-title]:not([id])>button::after{content:\"\";position:absolute;top:50%;right:0.7rem;width:12px;height:12px;margin-top:-6px;background:currentColor;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m6 3.5 4.5 4.5L6 12.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m6 3.5 4.5 4.5L6 12.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center / contain no-repeat;opacity:0.42;pointer-events:none;transition:rotate 200ms cubic-bezier(0.23, 1, 0.32, 1), opacity 160ms ease}#navigation-items li[data-title]:not([id])>button[aria-expanded=\"true\"]::after{rotate:90deg}#navigation-items li[data-title]:not([id])>button:hover::after{opacity:0.75}@media (prefers-reduced-motion: reduce){#navigation-items li[data-title]:not([id])>button::after{transition:none}}"}]}
{"page":{"pagePath":"pt/agents/harness/rag-hyde","slug":"/pt/agents/harness/rag-hyde","pageMetadata":{"title":"#4 RAG + HyDE — Retrieval Semântico","sidebarTitle":"RAG + HyDE","description":"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.","icon":"database","href":"/pt/agents/harness/rag-hyde"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,annotation:`annotation`,code:`code`,hr:`hr`,math:`math`,mi:`mi`,mn:`mn`,mo:`mo`,mrow:`mrow`,p:`p`,pre:`pre`,semantics:`semantics`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Info,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`HyDE`}),` (Hypothetical Document Embeddings) é a técnica clássica que gera uma `,_jsx(_components.strong,{children:`resposta hipotética`}),` para a pergunta do usuário e usa essa resposta como signal adicional de retrieval. No ChatCLI, HyDE opera em duas fases complementares: `,_jsx(_components.strong,{children:`3a`}),` expande keywords via hipótese LLM, `,_jsx(_components.strong,{children:`3b`}),` adiciona busca vetorial por cosseno.`]}),`\n`,_jsxs(Info,{children:[`HyDE é `,_jsx(_components.strong,{children:`opt-in`}),` (`,_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_ENABLED=true`}),`) para manter o steady-state sem custo adicional. Phase 3a custa +1 LLM call cheap; Phase 3b requer configurar um embedding provider.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`o-problema-que-hyde-resolve`,children:`O problema que HyDE resolve`}),`\n`,_jsxs(_components.p,{children:[`O retrieval de `,_jsx(_components.code,{children:`memory.Fact`}),` pré-pipeline era `,_jsx(_components.strong,{children:`keyword-only`}),`: o scorer bate tokens extraídos de mensagens recentes contra tags e content dos facts armazenados. Funciona bem quando o vocabulário bate exatamente — falha quando o usuário usa sinônimos ou faz perguntas abstratas.`]}),`\n`,_jsx(_components.p,{children:`Exemplo do gap:`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Sem HyDE`,id:`sem-hyde`,children:_jsxs(_components.p,{children:[`Usuário: `,_jsx(_components.code,{children:`como fazer X em Go?`}),_jsx(`br`,{}),`\nKeywords extraídas: `,_jsx(_components.code,{children:`[fazer, go]`}),_jsx(`br`,{}),`\nFact armazenado: `,_jsx(_components.code,{children:`\"use goroutines for concurrency in X pipelines\"`}),_jsx(`br`,{}),`\n`,_jsx(_components.strong,{children:`Match: ❌`}),` — “fazer” e “go” não aparecem literalmente no fact.`]})}),_jsx(Tab,{title:`Com HyDE 3a`,id:`com-hyde-3a`,children:_jsxs(_components.p,{children:[`Usuário: `,_jsx(_components.code,{children:`como fazer X em Go?`}),_jsx(`br`,{}),`\nHipótese LLM: `,_jsx(_components.code,{children:`\"In Go you would use goroutines and channels for X, leveraging the concurrency primitives...\"`}),_jsx(`br`,{}),`\nKeywords expandidas: `,_jsx(_components.code,{children:`[fazer, go, goroutines, channels, concurrency, primitives]`}),_jsx(`br`,{}),`\n`,_jsx(_components.strong,{children:`Match: ✅`})]})}),_jsx(Tab,{title:`Com HyDE 3b`,id:`com-hyde-3b`,children:_jsxs(_components.p,{children:[`Hipótese → embed (1024 dim via Voyage) → cosine search no vector store → top-3 facts semanticamente próximos.`,_jsx(`br`,{}),`\n`,_jsx(_components.strong,{children:`Match: ✅`}),` — mesmo sem nenhum keyword em comum.`]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`phase-3a-—-hypothesis-based-keyword-expansion`,children:`Phase 3a — Hypothesis-based keyword expansion`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Usuário digita query`,children:_jsxs(_components.p,{children:[`A query entra em `,_jsx(_components.code,{children:`cli_llm.go`}),` ou `,_jsx(_components.code,{children:`agent_mode.go`}),`.`]})}),_jsx(Step,{title:`HyDEAugmenter.Augment`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`augmenter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` memory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewHyDEAugmenter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cfg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`llmCallback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`expanded`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` augmenter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Augment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`originalHints`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),_jsx(Step,{title:`LLM gera hipótese curta`,children:_jsx(_components.p,{children:`Prompt: “Write a 2-4 sentence plausible answer that uses the technical nouns that would appear in any matching note. Bilingual if the query mixes languages.”`})}),_jsx(Step,{title:`ExtractKeywords da hipótese`,children:_jsx(_components.p,{children:`O mesmo extractor já usado no chat mode (stop words en+pt, min 3 chars).`})}),_jsx(Step,{title:`Merge unique + lower-case`,children:_jsxs(_components.p,{children:[`Keywords originais + top-N da hipótese, cap configurável via `,_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_NUM_KEYWORDS`}),` (default 5).`]})}),_jsx(Step,{title:`FactIndex.Search usa o set expandido`,children:_jsx(_components.p,{children:`Scorer keyword-based existente opera sobre hints mais rico → recall muito maior.`})})]}),`\n`,_jsxs(Tip,{children:[`Phase 3a `,_jsx(_components.strong,{children:`funciona sem configurar embedding provider`}),`. É o default recomendado se o custo de +1 LLM call leve é aceitável.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`phase-3b-—-vector-embeddings-+-ranking-fundido`,children:`Phase 3b — Vector embeddings + ranking fundido`}),`\n`,_jsxs(_components.p,{children:[`Adiciona busca por `,_jsx(_components.strong,{children:`cosine similarity`}),` sobre embeddings de facts — e, desde a refatoração de ranking, `,_jsx(_components.strong,{children:`funde o score de cosseno`}),` com os sinais lexical e temporal num único ranking.`]}),`\n`,_jsxs(Info,{children:[_jsx(_components.strong,{children:`O que mudou (PR #1027):`}),` antes, os hits vetoriais eram dissolvidos de volta em keywords e o score de cosseno era `,_jsx(_components.strong,{children:`descartado`}),` — pagava-se uma chamada de embedding e jogava-se fora justamente o sinal semântico. Agora o cosseno flui direto para o ranker fundido `,_jsx(_components.code,{children:`SearchBlended`}),`, então um fato achado só por paráfrase (zero overlap lexical) consegue rankear.`]}),`\n`,_jsx(Heading,{level:`3`,id:`arquitetura`,children:`Arquitetura`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`24`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`┌──────────────────┐`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ Query do usuário │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└────────┬─────────┘`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ Phase 3a: hipótese LLM → keywords expandidas`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ▼`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`┌──────────────────────────┐`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ EmbeddingProvider.Embed │ (Voyage / OpenAI / Bedrock / Null)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└────────┬─────────────────┘`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ vector float32`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ▼`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`┌──────────────────────────────────────┐`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ vindex.Index.Search(q, k, floor) │ cosine top-K, O(n log k), pure-Go`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└────────┬─────────────────────────────┘`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ []Hit{ID, Score} ← o score de cosseno é PRESERVADO`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ▼`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`┌────────────────────────────────────────────────┐`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ FactIndex.SearchBlended(keywords, semantic, w) │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ final = wSem·cosine + wLex·keyword │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`│ + wTemp·recência (min-max normalizado) │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└────────┬───────────────────────────────────────┘`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ▼`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Facts ranqueados por relevância FUNDIDA`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`ranking-fundido-searchblended`,children:[`Ranking fundido (`,_jsx(_components.code,{children:`SearchBlended`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`Três sinais independentes e complementares, cada um `,_jsx(_components.strong,{children:`normalizado min-max`}),` sobre o conjunto de candidatos antes da soma ponderada:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Sinal`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Origem`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Captura`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`semantic`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`cosseno do vector store`}),_jsx(_components.td,{style:{textAlign:`left`},children:`sinonímia, paráfrase`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`lexical`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`overlap de keyword/tag`}),_jsx(_components.td,{style:{textAlign:`left`},children:`termos exatos, identificadores, nomes de arquivo`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`temporal`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`decaimento por recência × frequência de acesso`}),_jsx(_components.td,{style:{textAlign:`left`},children:`o que o usuário realmente usa`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Pesos default (`,_jsx(_components.code,{children:`DefaultRankWeights`}),`): `,_jsx(_components.strong,{children:`semantic 0.55 · lexical 0.30 · temporal 0.15`}),` — semantic-first, porque a chamada de embedding já foi paga. A fusão é `,_jsx(_components.strong,{children:`aditiva`}),` (não multiplicativa) de propósito: um fato com cosseno alto e zero keyword `,_jsx(_components.strong,{children:`ainda rankeia`}),` — um produto o zeraria. A normalização min-max é o que torna os pesos `,_jsx(_components.strong,{children:`provider-agnostic`}),`: cosseno Voyage 1024-d e OpenAI 1536-d caem ambos em [0,1] após normalizar.`]}),`\n`,_jsxs(Tip,{children:[_jsx(_components.strong,{children:`Floor de cosseno`}),` (`,_jsx(_components.code,{children:`MinCosineScore`}),`, default `,_jsx(_components.code,{children:`0.25`}),`): embeddings sobre texto normalizado são quase sempre fracamente positivos, então o antigo corte em `,_jsx(_components.code,{children:`> 0`}),` admitia ruído quase-ortogonal. O floor mantém só fatos genuinamente relacionados no top-K.`]}),`\n`,_jsx(Heading,{level:`3`,id:`providers-suportados`,children:`Providers suportados`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Voyage (recomendado)`,id:`voyage-recomendado`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_USE_VECTORS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_PROVIDER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`voyage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` VOYAGE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pa-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Opcional: escolher modelo (default voyage-4, 1024-dim)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`voyage-4`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Por quê Voyage:`}),` é o provider `,_jsx(_components.strong,{children:`recomendado pela Anthropic`}),` para workflows Claude, tem alta qualidade/$ em retrieval, e o modelo default (`,_jsx(_components.code,{children:`voyage-4`}),`, 1024-dim) é o tier general-purpose da família voyage-4 — mesmo preço do voyage-3, estritamente melhor. `,_jsx(_components.code,{children:`voyage-4-large`}),` (flagship de qualidade), `,_jsx(_components.code,{children:`voyage-4-lite`}),` (mais barato) e `,_jsx(_components.code,{children:`voyage-code-4`}),` (retrieval de código) compartilham o mesmo espaço de embedding.`]})]}),_jsxs(Tab,{title:`OpenAI`,id:`openai`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_USE_VECTORS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_PROVIDER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`openai`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OPENAI_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sk-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Opcional: escolher modelo e dimensão custom`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text-embedding-3-small`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_DIMENSIONS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`512`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # pode reduzir para economizar storage`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Modelos:`}),` `,_jsx(_components.code,{children:`text-embedding-3-small`}),` (default, 1536-dim, $0.02/1M tokens) ou `,_jsx(_components.code,{children:`text-embedding-3-large`}),` (3072-dim, melhor qualidade). A dimensão nativa é detectada automaticamente a partir do modelo — só sete `,_jsx(_components.code,{children:`CHATCLI_EMBED_DIMENSIONS`}),` se quiser `,_jsx(_components.strong,{children:`truncar`}),` via Matryoshka (ex.: 512 para reduzir storage).`]})]}),_jsxs(Tab,{title:`Google (Gemini)`,id:`google-gemini`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_USE_VECTORS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_PROVIDER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`google`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` GEMINI_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AIza`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`...`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Opcional: escolher modelo e dimensão truncada`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`gemini-embedding-2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_DIMENSIONS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1536`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 128-3072 via Matryoshka`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Modelos:`}),` `,_jsx(_components.code,{children:`gemini-embedding-2`}),` (default, 3072-dim nativo, GA, multimodal-ready, com free tier) ou o antigo `,_jsx(_components.code,{children:`gemini-embedding-001`}),` (superado; desliga em 14/05/2028). Batches vão via `,_jsx(_components.code,{children:`:batchEmbedContents`}),`; dimensões truncadas são L2-normalizadas localmente, então qualquer `,_jsx(_components.code,{children:`CHATCLI_EMBED_DIMENSIONS`}),` entre 128 e 3072 é seguro para similaridade de cosseno.`]})]}),_jsxs(Tab,{title:`Bedrock (Titan + Cohere)`,id:`bedrock-titan-%2B-cohere`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_QUALITY_HYDE_USE_VECTORS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_PROVIDER`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bedrock`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Reusa a credentials chain do chat client — sem nova API key.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Defina region/profile se ainda não estão no ambiente.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` BEDROCK_REGION`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`us-east-1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` AWS_PROFILE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`meu-profile`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # opcional`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Opcional: escolher modelo`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amazon`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`titan-embed-text-v2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`0`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # default`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` CHATCLI_EMBED_DIMENSIONS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Titan v2: 256/512/1024`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Por quê Bedrock:`}),` mesma cadeia de credenciais AWS do chat — billing único, compliance AWS (CloudTrail, guardrails), VPC endpoints. Ideal pra empresas que já têm chat rodando via Bedrock e querem retrieval no mesmo perímetro.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Famílias suportadas:`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Model ID`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Família`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Dim suportadas`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Batch nativo`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`amazon.titan-embed-text-v2:0`}),` (default)`]}),_jsx(_components.td,{style:{textAlign:`left`},children:`Titan v2`}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`256, 512, 1024`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Não — paralelizado com pool de 8 workers`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`amazon.titan-embed-text-v1`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Titan v1`}),_jsx(_components.td,{style:{textAlign:`left`},children:`1536 (fixo)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Não — paralelizado`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`cohere.embed-english-v3`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Cohere v3 (en)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`1024 (fixo)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Sim — uma chamada por batch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`cohere.embed-multilingual-v3`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Cohere v3 (multi)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`1024 (fixo)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Sim — uma chamada por batch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`cohere.embed-v4:0`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Cohere v4 (multi, ctx 128K)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`1536 (default)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Sim — uma chamada por batch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`amazon.nova-2-multimodal-embeddings-v1:0`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Nova MME`}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:`256, 384, 1024, 3072 (default 3072)`}),_jsx(_components.td,{style:{textAlign:`left`},children:`Não — paralelizado com pool de 8 workers`})]})]})]}),_jsxs(_components.p,{children:[`A dispatch entre Titan e Cohere é auto pelo prefixo do model id. `,_jsx(_components.code,{children:`CHATCLI_EMBED_DIMENSIONS`}),` só vale pra Titan v2 (256/512/1024); valores inválidos são rejeitados no `,_jsx(_components.code,{children:`NewBedrock`}),` antes de qualquer call AWS.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Sem cobertura no Converse API:`}),` embeddings só estão em `,_jsx(_components.code,{children:`InvokeModel`}),`, então cada família mantém seu body schema dedicado — diferente do chat onde Converse cobre quase tudo.`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[`Troca a quente via `,_jsx(_components.code,{children:`/reload`}),`:`]}),` mudar `,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER`}),` / `,_jsx(_components.code,{children:`CHATCLI_EMBED_MODEL`}),` / `,_jsx(_components.code,{children:`CHATCLI_EMBED_DIMENSIONS`}),` no `,_jsx(_components.code,{children:`.env`}),` e rodar `,_jsx(_components.code,{children:`/reload`}),` reconstrói o provider na hora — re-conectando o retrieval semântico do `,_jsx(_components.code,{children:`/context --rag`}),` e o vector index da memória, sem reiniciar o ChatCLI. O índice auto-migra se provider/dimensão mudarem.`]})}),_jsxs(_components.p,{children:[`Veja `,_jsx(_components.a,{href:`/pt/providers/bedrock`,children:`AWS Bedrock`}),` pra config completa da credentials chain (SSO, IAM role, proxy corporativo, VPC endpoint).`]})]}),_jsx(Tab,{title:`Null (default)`,id:`null-default`,children:_jsxs(_components.p,{children:[`Se `,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER`}),` não está setado, o `,_jsx(_components.code,{children:`NullProvider`}),` é retornado. `,_jsx(_components.code,{children:`Embed()`}),` retorna erro — o código chama `,_jsx(_components.code,{children:`embedding.IsNull(p)`}),` antes para desviar para keyword-only. `,_jsx(_components.strong,{children:`Zero surpresas, zero falhas silenciosas.`})]})})]}),`\n`,_jsxs(Heading,{level:`3`,id:`vector-store-pure-go-—-primitivo-genérico-vindex`,children:[`Vector store pure-Go — primitivo genérico `,_jsx(_components.code,{children:`vindex`})]}),`\n`,_jsxs(Info,{children:[_jsx(_components.strong,{children:`Sem CGO, sem SQLite-vec, sem dependências externas.`}),` Só `,_jsx(_components.code,{children:`float32[]`}),` + cosseno + persistência JSON em `,_jsx(_components.code,{children:`~/.chatcli/memory/vector_index.json`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`O índice cosseno vive num pacote `,_jsx(_components.strong,{children:`genérico e reutilizável`}),`, `,_jsx(_components.code,{children:`llm/embedding/vindex`}),`, extraído quando um segundo consumidor (o `,_jsxs(_components.a,{href:`/pt/context/persistent-context`,children:[`retrieval semântico de `,_jsx(_components.code,{children:`/context`})]}),`) apareceu. O `,_jsx(_components.code,{children:`memory`}),` é só um `,_jsx(_components.strong,{children:`adapter fino`}),` sobre ele — sem máquina vetorial duplicada por pacote:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// llm/embedding/vindex — o primitivo único e agnóstico`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Index`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` struct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`/* provider, dim, entries map[string][]float32, path */`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`x `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Upsert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`error`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`x `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`float32`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`k`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`minScore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` float64`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) []`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Hit`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // top-K via min-heap`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`x `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Prune`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`keep`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`struct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{}) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// evita servir vetor obsoleto`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// cli/workspace/memory/vector_store.go — adapter de domínio \"fact\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` VectorIndex`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` struct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idx`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`vindex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Index`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` embedding`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` ScoredFact`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` struct`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Score`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` float64`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A seleção top-K usa um `,_jsx(_components.strong,{children:`min-heap O(n log k)`}),` (não full-sort O(n log n)), então o custo escala com `,_jsx(_components.code,{children:`k`}),`, não com o tamanho do corpus — o teto de escala deixa de ser “centenas de facts”. Para o caso típico do chatcli a busca linear completa em microssegundos; sem HNSW ou IVFFlat.`]}),`\n`,_jsx(Heading,{level:`3`,id:`auto-migração-de-provider/dimensão`,children:`Auto-migração de provider/dimensão`}),`\n`,_jsxs(_components.p,{children:[`Trocar de provider ou dimensão (Voyage 1024 → OpenAI 1536, ou voyage→cohere no mesmo 1024) `,_jsxs(_components.strong,{children:[`não exige mais `,_jsx(_components.code,{children:`rm`}),` manual`]}),`. No load, o índice detecta o mismatch — de `,_jsx(_components.strong,{children:`dimensão`}),` (cosseno entre arities diferentes é indefinido) `,_jsx(_components.strong,{children:`ou de provider`}),` (dois espaços de embedding distintos não são comparáveis, mesmo na mesma dimensão) — e `,_jsx(_components.strong,{children:`auto-limpa`}),` o cache, removendo o arquivo para o backfill repopular:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`WARN vindex provider changed — auto-clearing for re-embed on_disk_provider=voyage provider=cohere`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`WARN vindex dimension mismatch — auto-clearing for re-embed on_disk_dim=1024 provider_dim=1536`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Warning,{children:[`O caso provider→provider no mesmo dim (ex.: voyage 1024 → cohere 1024) antes era `,_jsx(_components.strong,{children:`silenciosamente servido como lixo`}),` — o cosseno entre espaços diferentes não tem sentido. Agora é detectado e re-embeddado.`]}),`\n`,_jsx(Heading,{level:`3`,id:`lazy-backfill`,children:`Lazy backfill`}),`\n`,_jsxs(_components.p,{children:[`Ao retrieve uma fact, se ela não tem vetor (fact pré-existe à ativação de embeddings), o index spawna goroutine `,_jsx(_components.strong,{children:`detached`}),` para embedar as top-500 facts visíveis:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// cli/workspace/memory/store.go:120`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`go`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) { `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`//#nosec G118 -- detached on purpose`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`vectors`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`BackfillFacts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Background`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`logger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Warn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vector backfill failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`zap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(Tip,{children:[`O backfill é `,_jsx(_components.strong,{children:`bounded`}),` e configurável: no máximo `,_jsx(_components.code,{children:`Config.BackfillBatchMax`}),` facts por retrieve (default 500). Com Voyage (~`,_jsxs(_components.span,{className:`katex`,children:[_jsx(_components.span,{className:`katex-mathml`,children:_jsx(_components.math,{xmlns:`http://www.w3.org/1998/Math/MathML`,children:_jsxs(_components.semantics,{children:[_jsxs(_components.mrow,{children:[_jsx(_components.mn,{children:`0.05`}),_jsx(_components.mi,{mathvariant:`normal`,children:`/`}),_jsx(_components.mi,{children:`M`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mi,{children:`o`}),_jsx(_components.mi,{children:`k`}),_jsx(_components.mi,{children:`e`}),_jsx(_components.mi,{children:`n`}),_jsx(_components.mi,{children:`s`}),_jsx(_components.mo,{stretchy:`false`,children:`)`}),_jsx(_components.mi,{children:`i`}),_jsx(_components.mi,{children:`s`}),_jsx(_components.mi,{children:`s`}),_jsx(_components.mi,{children:`o`}),_jsx(_components.mi,{children:`c`}),_jsx(_components.mi,{children:`u`}),_jsx(_components.mi,{children:`s`}),_jsx(_components.mi,{children:`t`}),_jsx(_components.mi,{children:`a`}),_jsx(_components.mi,{children:`c`}),_jsx(_components.mi,{children:`e`}),_jsx(_components.mi,{children:`r`}),_jsx(_components.mi,{children:`c`}),_jsx(_components.mi,{children:`a`}),_jsx(_components.mi,{children:`d`}),_jsx(_components.mi,{children:`e`}),_jsx(_components.mi,{children:`U`}),_jsx(_components.mi,{children:`S`})]}),_jsx(_components.annotation,{encoding:`application/x-tex`,children:`0.05/M tokens) isso custa cerca de US`})]})})}),_jsx(_components.span,{className:`katex-html`,\"aria-hidden\":`true`,children:_jsxs(_components.span,{className:`base`,children:[_jsx(_components.span,{className:`strut`,style:{height:`1em`,verticalAlign:`-0.25em`}}),_jsx(_components.span,{className:`mord`,children:`0.05/`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.109em`},children:`M`}),_jsx(_components.span,{className:`mord mathnormal`,children:`t`}),_jsx(_components.span,{className:`mord mathnormal`,children:`o`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0315em`},children:`k`}),_jsx(_components.span,{className:`mord mathnormal`,children:`e`}),_jsx(_components.span,{className:`mord mathnormal`,children:`n`}),_jsx(_components.span,{className:`mord mathnormal`,children:`s`}),_jsx(_components.span,{className:`mclose`,children:`)`}),_jsx(_components.span,{className:`mord mathnormal`,children:`i`}),_jsx(_components.span,{className:`mord mathnormal`,children:`ssoc`}),_jsx(_components.span,{className:`mord mathnormal`,children:`u`}),_jsx(_components.span,{className:`mord mathnormal`,children:`s`}),_jsx(_components.span,{className:`mord mathnormal`,children:`t`}),_jsx(_components.span,{className:`mord mathnormal`,children:`a`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0278em`},children:`cer`}),_jsx(_components.span,{className:`mord mathnormal`,children:`c`}),_jsx(_components.span,{className:`mord mathnormal`,children:`a`}),_jsx(_components.span,{className:`mord mathnormal`,children:`d`}),_jsx(_components.span,{className:`mord mathnormal`,children:`e`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.109em`},children:`U`}),_jsx(_components.span,{className:`mord mathnormal`,style:{marginRight:`0.0576em`},children:`S`})]})})]}),` 0,001 num cold cache cheio. Em uma sessão normal, a maioria do index fica embeddado já na primeira interação.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`o-tool-@embed-para-o-agent`,children:`O tool @embed para o agent`}),`\n`,_jsxs(_components.p,{children:[`O backend de embeddings também é exposto diretamente ao modelo como o tool `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`@embed`})}),` (modos agent/coder), do mesmo jeito que o `,_jsx(_components.code,{children:`@image`}),` expõe geração de imagem:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctool_call name=\"@embed\" args='{\"cmd\":\"similarity\",\"args\":{\"a\":\"resetar uma senha\",\"b\":\"recuperar acesso à conta\"}}' />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Subcomando`}),_jsx(_components.th,{children:`Propósito`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`similarity {a, b}`})}),_jsx(_components.td,{children:`similaridade de cosseno entre dois textos, em [-1, 1]`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`rank {query, candidates, k?}`})}),_jsx(_components.td,{children:`ordena textos candidatos por relevância semântica a uma query`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`text {text|texts, out?}`})}),_jsxs(_components.td,{children:[`embedda textos; com `,_jsx(_components.code,{children:`out`}),`, salva JSONL `,_jsx(_components.code,{children:`{index, text, embedding}`}),` para pipelines externos`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:`mostra provider, modelo e dimensão`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Usa a mesma configuração `,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER`}),` descrita acima. Para `,_jsx(_components.strong,{children:`RAG persistente sobre documentos`}),`, o modelo é direcionado ao `,_jsx(_components.code,{children:`@context`}),` (construir/atachar base de conhecimento) + `,_jsx(_components.code,{children:`@knowledge`}),` (consultar) — o `,_jsx(_components.code,{children:`@embed`}),` cobre as operações semânticas ad-hoc que não precisam de índice.`]}),`\n`,_jsx(Heading,{level:`2`,id:`avaliação-—-provando-o-retrieval-não-supondo`,children:`Avaliação — provando o retrieval (não supondo)`}),`\n`,_jsxs(_components.p,{children:[`Antes não havia como `,_jsx(_components.strong,{children:`medir`}),` se o retrieval era bom. Agora há um harness de avaliação dependency-free em `,_jsx(_components.code,{children:`cli/workspace/memory/eval`}),` — métricas padrão de IR macro-averaged:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Métrica`}),_jsx(_components.th,{style:{textAlign:`left`},children:`O que mede`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`recall@k`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`fração dos facts relevantes recuperados no top-k`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`precision@k`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`fração do top-k que era relevante`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`MRR`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`rank recíproco médio do primeiro acerto`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.strong,{children:`nDCG@k`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`ganho cumulativo descontado normalizado`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`O A/B versionado (em `,_jsx(_components.code,{children:`ranking_test.go`}),`, com um provider de embedding determinístico) compara keyword-only vs. ranking fundido sobre queries que usam `,_jsx(_components.strong,{children:`sinônimos`}),` ausentes do texto dos facts:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`baseline (keyword): recall@1=0.2857 MRR=0.2857 nDCG@1=0.2857`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`candidate (blended): recall@1=1.0000 MRR=1.0000 nDCG@1=1.0000`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`delta : recall@1=+0.7143`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Info,{children:`O harness roda igual em CI (provider determinístico, reproduzível) ou contra um backend real — ele nunca importa um provider, então fica neutro entre os 14 suportados. É o que transforma “parece bom” em “é bom, medido”, e guarda contra regressões.`}),`\n`,_jsx(Heading,{level:`3`,id:`tunables-de-ranking-sem-novos-env-vars`,children:`Tunables de ranking (sem novos env vars)`}),`\n`,_jsxs(_components.p,{children:[`Os parâmetros do ranking fundido vivem como campos de `,_jsx(_components.code,{children:`Config`}),` com defaults fortes — `,_jsx(_components.strong,{children:`não`}),` foram criados novos env vars (e os `,_jsx(_components.code,{children:`CHATCLI_MEMORY_*`}),` que já existiam, antes ignorados no caminho estruturado, agora são aplicados via `,_jsx(_components.code,{children:`ConfigFromEnv`}),` + clamp):`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsxs(_components.th,{style:{textAlign:`left`},children:[`Campo `,_jsx(_components.code,{children:`Config`})]}),_jsx(_components.th,{style:{textAlign:`left`},children:`Default`}),_jsx(_components.th,{style:{textAlign:`left`},children:`O que controla`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`RankWeights`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`{0.55, 0.30, 0.15}`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`pesos semantic / lexical / temporal`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`MinCosineScore`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`0.25`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`floor de cosseno no top-K`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`VectorTopK`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`12`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`candidatos vetoriais por query`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`BackfillBatchMax`})}),_jsx(_components.td,{\"data-numeric\":`true`,style:{textAlign:`left`},children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`teto de facts embeddados por retrieve`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`configuração-completa`,children:`Configuração completa`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Env var`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`O que faz`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_ENABLED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`Master switch (phase 3a)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_USE_VECTORS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsx(_components.td,{children:`Liga phase 3b (requer provider)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_NUM_KEYWORDS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`5`})}),_jsx(_components.td,{children:`Cap de keywords da hipótese em phase 3a`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`voyage`}),` / `,_jsx(_components.code,{children:`openai`}),` / `,_jsx(_components.code,{children:`bedrock`}),` / `,_jsx(_components.code,{children:`null`}),` — `,_jsx(_components.strong,{children:`única fonte de verdade`}),` para selecionar o provider`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_EMBED_MODEL`})}),_jsx(_components.td,{children:`provider default`}),_jsxs(_components.td,{children:[`Voyage: `,_jsx(_components.code,{children:`voyage-4`}),`. OpenAI: `,_jsx(_components.code,{children:`text-embedding-3-small`}),` / `,_jsx(_components.code,{children:`-large`}),`. Bedrock: `,_jsx(_components.code,{children:`amazon.titan-embed-text-v2:0`}),` (default), `,_jsx(_components.code,{children:`amazon.titan-embed-text-v1`}),`, `,_jsx(_components.code,{children:`cohere.embed-english-v3`}),`, `,_jsx(_components.code,{children:`cohere.embed-multilingual-v3`}),`, `,_jsx(_components.code,{children:`cohere.embed-v4:0`}),`, `,_jsx(_components.code,{children:`amazon.nova-2-multimodal-embeddings-v1:0`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_EMBED_DIMENSIONS`})}),_jsx(_components.td,{children:`nativa do modelo`}),_jsx(_components.td,{children:`OpenAI: trunca via Matryoshka. Bedrock Titan v2: 256 / 512 / 1024 (rejeita outros). Bedrock Titan v1 / Cohere v3: dimensão fixa, ignorada.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BEDROCK_REGION`}),` / `,_jsx(_components.code,{children:`AWS_REGION`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`us-east-1`})}),_jsxs(_components.td,{children:[`Região AWS — só usado quando `,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER=bedrock`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AWS_PROFILE`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Profile AWS — só usado quando `,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER=bedrock`}),`.`]})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsxs(Heading,{level:`2`,id:`/config-quality-expõe-o-estado`,children:[_jsx(_components.code,{children:`/config quality`}),` expõe o estado`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`── RAG + HyDE (#4)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_QUALITY_HYDE_ENABLED : enabled`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_QUALITY_HYDE_USE_VECTORS: enabled`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_EMBED_PROVIDER : bedrock`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_EMBED_MODEL : amazon.titan-embed-text-v2:0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_EMBED_DIMENSIONS : 1024`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` CHATCLI_QUALITY_HYDE_NUM_KEYWORDS: 5`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Provedor de vetores : bedrock:amazon.titan-embed-text-v2:0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Entradas vetoriais : 127`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`integração-com-reflexion`,children:`Integração com Reflexion`}),`\n`,_jsx(_components.p,{children:`HyDE amplifica o valor de Reflexion: as lições persistidas pela #3 são recuperadas com muito mais recall quando a próxima tarefa não usa exatamente as mesmas keywords. Workflow:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Turn 1: refactor auth.go falha (timeout)`,children:_jsxs(_components.p,{children:[`Reflexion persiste lesson: `,_jsx(_components.code,{children:`\"use Edit tool for large files\"`}),`, tags `,_jsx(_components.code,{children:`[go, refactor, edit-tool]`}),`.`]})}),_jsx(Step,{title:`Turn 5 (dias depois): 'me ajuda a dividir pkg/engine'`,children:_jsxs(_components.p,{children:[`Query não contém `,_jsx(_components.code,{children:`refactor`}),` ou `,_jsx(_components.code,{children:`edit`}),`. Keyword-only `,_jsx(_components.strong,{children:`perderia`}),` a lesson.`]})}),_jsx(Step,{title:`HyDE 3a gera hipótese`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"To split a Go package, identify logical groupings and use refactor patterns with Edit tool for surgical changes...\"`}),_jsx(`br`,{}),`\nKeywords extraídas: `,_jsx(_components.code,{children:`[split, package, refactor, edit, patterns, …]`})]})}),_jsx(Step,{title:`Match!`,children:_jsxs(_components.p,{children:[`Lesson aparece no system prompt. Coder escolhe `,_jsx(_components.code,{children:`Edit`}),` ao invés de `,_jsx(_components.code,{children:`write`}),` de primeira.`]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`caveats-e-tuning`,children:`Caveats e tuning`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.strong,{children:`Token cost`}),` de phase 3a: ~200 tokens por turn de retrieval. Em workflows com muitos turns de leitura, o custo acumula. Use `,_jsx(_components.code,{children:`CHATCLI_QUALITY_HYDE_NUM_KEYWORDS=3`}),` para budget mais apertado.`]}),`\n`,_jsxs(Warning,{children:[_jsx(_components.strong,{children:`Privacy`}),`: a query do usuário é enviada ao provider de embedding. Para workloads sensíveis em ambientes corporativos, `,_jsx(_components.strong,{children:`Bedrock é o caminho preferido`}),` — fica dentro do perímetro AWS (CloudTrail, VPC endpoint, IAM). Para workloads locais sem rede, considere self-host (roadmap: provider Ollama-embedding).`]}),`\n`,_jsxs(Info,{children:[_jsx(_components.strong,{children:`Fallback gracioso`}),`: se o LLM fail ou o provider embedding retornar erro, o retrieval cai para keyword-only silenciosamente. Nenhum turn é abortado por falha de HyDE.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`leia-também`,children:`Leia também`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`#3 Reflexion`,icon:`lightbulb`,href:`/pt/agents/harness/reflexion`,children:_jsx(_components.p,{children:`As lições que HyDE recupera com mais recall.`})}),_jsx(Card,{title:`Bootstrap Memory`,icon:`brain`,href:`/pt/context/bootstrap-memory`,children:_jsx(_components.p,{children:`A camada embaixo: como memory.Fact é populada e mantida.`})}),_jsx(Card,{title:`Persistent Context`,icon:`database`,href:`/pt/context/persistent-context`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`/context attach`}),` para contextos explícitos de arquivos.`]})}),_jsx(Card,{title:`Configuração completa`,icon:`sliders`,href:`/pt/agents/harness/configuration`,children:_jsx(_components.p,{children:`Todos os env e slashes.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"#4 RAG + HyDE — Retrieval Semântico","sidebarTitle":"RAG + HyDE","description":"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.","icon":"database","href":"/pt/agents/harness/rag-hyde"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"O problema que HyDE resolve","slug":"o-problema-que-hyde-resolve","depth":2,"children":[]},{"title":"Phase 3a — Hypothesis-based keyword expansion","slug":"phase-3a-—-hypothesis-based-keyword-expansion","depth":2,"children":[]},{"title":"Phase 3b — Vector embeddings + ranking fundido","slug":"phase-3b-—-vector-embeddings-+-ranking-fundido","depth":2,"children":[{"title":"Arquitetura","slug":"arquitetura","depth":3,"children":[]},{"title":"Ranking fundido (SearchBlended)","slug":"ranking-fundido-searchblended","depth":3,"children":[]},{"title":"Providers suportados","slug":"providers-suportados","depth":3,"children":[]},{"title":"Vector store pure-Go — primitivo genérico vindex","slug":"vector-store-pure-go-—-primitivo-genérico-vindex","depth":3,"children":[]},{"title":"Auto-migração de provider/dimensão","slug":"auto-migração-de-provider/dimensão","depth":3,"children":[]},{"title":"Lazy backfill","slug":"lazy-backfill","depth":3,"children":[]}]},{"title":"O tool @embed para o agent","slug":"o-tool-@embed-para-o-agent","depth":2,"children":[]},{"title":"Avaliação — provando o retrieval (não supondo)","slug":"avaliação-—-provando-o-retrieval-não-supondo","depth":2,"children":[{"title":"Tunables de ranking (sem novos env vars)","slug":"tunables-de-ranking-sem-novos-env-vars","depth":3,"children":[]}]},{"title":"Configuração completa","slug":"configuração-completa","depth":2,"children":[]},{"title":"/config quality expõe o estado","slug":"/config-quality-expõe-o-estado","depth":2,"children":[]},{"title":"Integração com Reflexion","slug":"integração-com-reflexion","depth":2,"children":[]},{"title":"Caveats e tuning","slug":"caveats-e-tuning","depth":2,"children":[]},{"title":"Leia também","slug":"leia-também","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/encom/03414b2589eb02b8/flags.js","/_mintlify/custom/encom/f19b212850d023b6/sidebar-focus.js"],"subdomain":"encom","siteName":"ChatCLI","title":"#4 RAG + HyDE — Retrieval Semântico - ChatCLI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/agents/harness/rag-hyde","matchLevel":1},"pt-BR":{"href":"/pt/agents/harness/rag-hyde","matchLevel":0}}},"lastModified":"2026-10-09T21:28:56.255Z","originalFileLocation":"pt/agents/harness/rag-hyde.mdx","locale":"pt-BR"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ChatCLI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"#4 RAG + HyDE — Retrieval Semântico - ChatCLI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ChatCLI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://encom.mintlify.site/_mintlify/api/og/v2?division=Harness+%287+padr%C3%B5es+%2B+evals%29\u0026amp;title=%234+RAG+%2B+HyDE+%E2%80%94+Retrieval+Sem%C3%A2ntico\u0026amp;description=Duas+camadas+de+retrieval+sobre+memory.Fact%3A+Phase+3a+gera+uma+hip%C3%B3tese+LLM+e+extrai+keywords%3B+Phase+3b+embedding+vetores+%28Voyage+%2F+OpenAI+%2F+Bedrock+Titan-Coher\u0026amp;theme=249ebac7523b8d2943a70ab3\u0026amp;signature=da7bf238a6ffa8405cfecb9582370e89e236526e8ecfeb4108a4f056e906d67d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"#4 RAG + HyDE — Retrieval Semântico - ChatCLI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://encom.mintlify.site/_mintlify/api/og/v2?division=Harness+%287+padr%C3%B5es+%2B+evals%29\u0026amp;title=%234+RAG+%2B+HyDE+%E2%80%94+Retrieval+Sem%C3%A2ntico\u0026amp;description=Duas+camadas+de+retrieval+sobre+memory.Fact%3A+Phase+3a+gera+uma+hip%C3%B3tese+LLM+e+extrai+keywords%3B+Phase+3b+embedding+vetores+%28Voyage+%2F+OpenAI+%2F+Bedrock+Titan-Coher\u0026amp;theme=249ebac7523b8d2943a70ab3\u0026amp;signature=da7bf238a6ffa8405cfecb9582370e89e236526e8ecfeb4108a4f056e906d67d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ChatCLI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0F766E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/pt/agents/harness/rag-hyde.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://chatcli.edilsonfreitas.com/agents/harness/rag-hyde\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://chatcli.edilsonfreitas.com/agents/harness/rag-hyde\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\",\"name\":\"ChatCLI\",\"url\":\"https://chatcli.edilsonfreitas.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=965a0feb9bd2f65a11b3c486e2488101\"}},{\"@type\":\"WebSite\",\"@id\":\"https://chatcli.edilsonfreitas.com#website\",\"name\":\"ChatCLI\",\"url\":\"https://chatcli.edilsonfreitas.com\",\"publisher\":{\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde#webpage\",\"url\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\",\"name\":\"#4 RAG + HyDE — Retrieval Semântico\",\"description\":\"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\",\"dateModified\":\"2026-10-09T21:28:56.255Z\",\"isPartOf\":{\"@id\":\"https://chatcli.edilsonfreitas.com#website\"},\"breadcrumb\":{\"@id\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Documentação\",\"item\":\"https://chatcli.edilsonfreitas.com/pt/usage/basic-usage\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Agentes\",\"item\":\"https://chatcli.edilsonfreitas.com/pt/agents/native-tool-use\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Harness (7 padrões + evals)\",\"item\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/overview\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"#4 RAG + HyDE — Retrieval Semântico\",\"item\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde#article\",\"headline\":\"#4 RAG + HyDE — Retrieval Semântico\",\"name\":\"#4 RAG + HyDE — Retrieval Semântico\",\"description\":\"Duas camadas de retrieval sobre memory.Fact: Phase 3a gera uma hipótese LLM e extrai keywords; Phase 3b embedding vetores (Voyage / OpenAI / Bedrock Titan-Cohere) + busca cosseno pure-Go com ranking fundido (semantic+lexical+temporal), floor de cosseno, auto-migração e harness de avaliação (recall@k/MRR/nDCG). Primitivo vindex reutilizável, JSON persistido, zero CGO.\",\"url\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde\",\"mainEntityOfPage\":{\"@id\":\"https://chatcli.edilsonfreitas.com/pt/agents/harness/rag-hyde#webpage\"},\"dateModified\":\"2026-10-09T21:28:56.255Z\",\"publisher\":{\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\"},\"isPartOf\":{\"@id\":\"https://chatcli.edilsonfreitas.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ChatCLI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ChatCLI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/pt/agents/harness/rag-hyde.md","siteName":"ChatCLI","nav":{"global":null,"languages":[{"language":"en","default":true,"pages":[{"title":"en","href":"/agents/harness/rag-hyde"}]},{"language":"pt-BR","footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Recursos","items":[{"label":"Documentação","href":"/pt"},{"label":"Cookbook","href":"/pt/cookbook/agent-refactoring"},{"label":"API Reference","href":"/pt/reference/api/overview"}]},{"header":"Comunidade","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribuição","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"navbar":{"links":[{"href":"/pt/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/pt/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Instalar","href":"/pt/start/installation"}},"groups":[{"group":"Comece aqui","pages":[{"title":"ChatCLI","sidebarTitle":"Visão geral","icon":"house","mode":"wide","href":"/pt"},{"title":"Início rápido","icon":"rocket","href":"/pt/start/quickstart"},{"title":"Instalação e Configuração","sidebarTitle":"Instalação","icon":"download","href":"/pt/start/installation"},{"title":"Deploy com Docker e Kubernetes","sidebarTitle":"Docker \u0026 Kubernetes","icon":"docker","href":"/pt/start/docker-deployment"},{"title":"Auto-Update","sidebarTitle":"Auto-Update","icon":"arrows-rotate","href":"/pt/start/auto-update"},{"title":"Migração de Configuração","sidebarTitle":"Migração de Config","icon":"arrows-rotate","href":"/pt/start/config-migration"}]},{"group":"Documentação","pages":[{"group":"Usando o ChatCLI","icon":"terminal","pages":[{"title":"Uso Básico e Comandos Principais","sidebarTitle":"Uso Básico","icon":"terminal","href":"/pt/usage/basic-usage"},{"title":"Adicionando Contexto (@ Comandos)","sidebarTitle":"Comandos de Contexto","icon":"at","href":"/pt/usage/context-commands"},{"title":"Modo Agente: Execução de Tarefas","sidebarTitle":"Modo Agente (/agent)","icon":"robot","href":"/pt/usage/agent-mode"},{"title":"Modo Coder (/coder)","sidebarTitle":"Modo Coder (/coder)","icon":"code","href":"/pt/usage/coder-mode"},{"title":"Modo Não-Interativo (One-Shot)","sidebarTitle":"Modo One-Shot","icon":"terminal","href":"/pt/usage/non-interactive-mode"},{"title":"Controle de Conversa","sidebarTitle":"Controle de Conversa","icon":"clock-rotate-left","href":"/pt/usage/conversation-control"},{"title":"Entrada Multilinha","sidebarTitle":"Entrada Multilinha","icon":"bars-staggered","href":"/pt/usage/multiline-input"},{"title":"Streaming em Tempo Real","sidebarTitle":"Streaming","icon":"bolt","href":"/pt/usage/streaming"},{"title":"Entrada de Imagem (Visão)","sidebarTitle":"Entrada de Imagem (Visão)","icon":"eye","href":"/pt/usage/vision-input"},{"title":"Entrada de PDF","sidebarTitle":"Entrada de PDF","icon":"file-pdf","href":"/pt/usage/pdf-input"},{"title":"Web UI","sidebarTitle":"Web UI","icon":"browser","href":"/pt/usage/web-ui"},{"title":"Dash ao Vivo","sidebarTitle":"Dash ao Vivo","icon":"chart-network","href":"/pt/usage/live-dashboard"},{"title":"UI Compacta (Modo Compact)","sidebarTitle":"UI Compacta","icon":"minimize","href":"/pt/usage/compact-ui"},{"title":"Sistema de Tema (Cores)","sidebarTitle":"Sistema de Tema","icon":"palette","href":"/pt/usage/ui-theme"},{"title":"Internacionalização (i18n)","sidebarTitle":"Internacionalização","icon":"language","href":"/pt/usage/i18n"}]},{"group":"Coder","icon":"code","pages":[{"title":"Plugin @coder","sidebarTitle":"Plugin @coder","icon":"hammer","href":"/pt/coder/coder-plugin"},{"title":"Tools Atômicos (@read, @search, @tree, @todo)","sidebarTitle":"Tools Atômicos","icon":"wand-magic-sparkles","href":"/pt/coder/atomic-tools"},{"title":"Segurança do Modo Coder (Governanca)","sidebarTitle":"Segurança do Modo Coder (Governanca)","icon":"shield-halved","href":"/pt/coder/coder-security"},{"title":"Sistema de Permissoes Avancado","sidebarTitle":"Permissoes","icon":"shield-halved","href":"/pt/coder/enhanced-permissions"},{"title":"Git Worktrees","sidebarTitle":"Git Worktrees","icon":"code-branch","href":"/pt/coder/worktrees"},{"title":"Detecção de Staleness de Arquivos","sidebarTitle":"File Staleness","icon":"eye","href":"/pt/coder/file-staleness"},{"title":"Recuperação de JSON","sidebarTitle":"Recuperação de JSON","icon":"screwdriver-wrench","href":"/pt/coder/json-recovery"},{"title":"Diagnósticos LSP","sidebarTitle":"Diagnósticos LSP","icon":"stethoscope","href":"/pt/coder/lsp-diagnostics"},{"title":"Perguntas Interativas (ask_user)","sidebarTitle":"Perguntas Interativas","icon":"list-check","href":"/pt/coder/interactive-ask"},{"title":"Progresso Live dos Agents","sidebarTitle":"Progresso Live","icon":"chart-bar","href":"/pt/coder/agent-progress-ui"}]},{"group":"Agentes","icon":"robot","pages":[{"title":"Tool Use Nativo (API Estruturada)","sidebarTitle":"Tool Use Nativo","icon":"wrench","href":"/pt/agents/native-tool-use"},{"title":"IA Agentiva e Sistema de Plugins","sidebarTitle":"IA Agentiva e Plugins","icon":"puzzle-piece","href":"/pt/agents/agentic-plugins"},{"title":"Agentes Customizáveis (Personas)","sidebarTitle":"Agentes Customizáveis","icon":"user-gear","href":"/pt/agents/customizable-agents"},{"title":"Orquestração Multi-Agent","sidebarTitle":"Multi-Agent","icon":"users","href":"/pt/agents/multi-agent-orchestration"},{"title":"Agent Squad","sidebarTitle":"Agent Squad","icon":"people-group","href":"/pt/agents/agent-squad"},{"title":"Task Graph","sidebarTitle":"Task Graph","icon":"diagram-project","href":"/pt/agents/task-graph"},{"title":"Delegação para Subagent","sidebarTitle":"Subagent Delegate","icon":"diagram-project","href":"/pt/agents/subagent-delegation"},{"title":"Mixture-of-Agents (MoA)","sidebarTitle":"Mixture-of-Agents","icon":"layer-group","href":"/pt/agents/mixture-of-agents"},{"title":"Roteamento de Modelo (@model)","sidebarTitle":"Roteamento de Modelo","icon":"shuffle","href":"/pt/agents/model-routing"},{"title":"Agent Park \u0026 Resume — Suspensão não-bloqueante","sidebarTitle":"Park \u0026 Resume","icon":"circle-pause","href":"/pt/agents/agent-park"},{"group":"Harness (7 padrões + evals)","icon":"wand-magic-sparkles","pages":[{"title":"Harness/Pipeline de Qualidade do Agente","sidebarTitle":"Visão Geral","icon":"sparkles","href":"/pt/agents/harness/overview"},{"title":"#1 ReAct — Reason + Act","sidebarTitle":"ReAct","icon":"rotate","href":"/pt/agents/harness/react"},{"title":"#2 Plan-and-Solve / ReWOO","sidebarTitle":"Plan-and-Solve","icon":"list-check","href":"/pt/agents/harness/plan-and-solve"},{"title":"#3 Reflexion — Aprender com Falhas","sidebarTitle":"Reflexion","description":"Após erro, alucinação ou qualidade baixa, uma chamada LLM destila uma lição estruturada (situation / mistake / correction) e persiste em memory.Fact. Próximas tarefas similares a recuperam via RAG — fechando o loop sem retreinamento.","icon":"lightbulb","href":"/pt/agents/harness/reflexion"},{"title":"#4 RAG + HyDE — Retrieval Semântico","sidebarTitle":"RAG + HyDE","icon":"database","href":"/pt/agents/harness/rag-hyde"},{"title":"#5 Self-Refine — Crítica e Reescrita","sidebarTitle":"Self-Refine","description":"RefinerAgent recebe o rascunho do worker anterior, emite crítica estruturada em \u003ccritique> e reescrita em \u003crevised>. Multi-pass com convergência por EpsilonChars para não iterar em outputs já bons.","icon":"wand-magic-sparkles","href":"/pt/agents/harness/self-refine"},{"title":"#6 Chain-of-Verification (CoVe)","sidebarTitle":"CoVe","icon":"check-double","href":"/pt/agents/harness/cove"},{"title":"#7 Reasoning Backbone Cross-Provider","sidebarTitle":"Reasoning Backbone","icon":"brain-circuit","href":"/pt/agents/harness/reasoning-backbone"},{"title":"Configuração — Env, Slashes e /config","sidebarTitle":"Configuração","icon":"sliders","href":"/pt/agents/harness/configuration"},{"title":"Evals: medindo o ChatCLI","sidebarTitle":"Evals","icon":"flask","href":"/pt/agents/harness/evals"}]}]},{"group":"Contexto e memória","icon":"layer-group","pages":[{"title":"LongMemEval: o quanto o chatcli lembra","sidebarTitle":"Resultados no LongMemEval","icon":"chart-simple","href":"/pt/context/longmemeval"},{"title":"Gerenciamento de Contexto Persistente","sidebarTitle":"Contextos (/context)","icon":"database","href":"/pt/context/persistent-context"},{"title":"Knowledge Base (RAG keyless)","sidebarTitle":"Knowledge Base","icon":"book-open","href":"/pt/context/knowledge-base"},{"title":"Bootstrap e Memória Persistente","sidebarTitle":"Bootstrap e Memória","icon":"memory","href":"/pt/context/bootstrap-memory"},{"title":"Grafo de Conhecimento e Vault do Obsidian","sidebarTitle":"Grafo de Conhecimento","icon":"diagram-project","href":"/pt/context/knowledge-graph"},{"title":"Path-Specific Rules","sidebarTitle":"Path Rules","icon":"folder-tree","href":"/pt/context/path-rules"},{"title":"Filtragem com .chatignore","sidebarTitle":".chatignore","icon":"filter","href":"/pt/context/chatignore"},{"group":"Sessões","icon":"clock-rotate-left","pages":[{"title":"Gerenciamento de Sessões","sidebarTitle":"Sessões","icon":"clock-rotate-left","href":"/pt/context/session-management"},{"title":"Busca em Conversas (@session)","sidebarTitle":"Busca em Conversas","icon":"magnifying-glass","href":"/pt/context/session-search"},{"title":"Workspace de Sessão (Scratch Dir)","sidebarTitle":"Session Workspace","icon":"folder-tree","href":"/pt/context/session-workspace"},{"title":"Exportação de Trajetória (ShareGPT)","sidebarTitle":"Exportar Trajetória","icon":"file-export","href":"/pt/context/trajectory-export"}]},{"group":"Eficiência de tokens","icon":"gauge-high","pages":[{"title":"Eficiência de Tokens","sidebarTitle":"Eficiência de Tokens","icon":"gauge-high","href":"/pt/context/token-efficiency"},{"title":"Compressão de Contexto (CCR)","sidebarTitle":"Compressão de Contexto","icon":"file-zipper","href":"/pt/context/context-compression"},{"title":"Curadoria do Prefixo do Chat","sidebarTitle":"Curadoria de Prefixo","icon":"scissors","href":"/pt/context/prefix-curation"},{"title":"Gerenciamento de Resultados de Ferramentas","sidebarTitle":"Resultados de Tools","icon":"database","href":"/pt/context/tool-result-management"},{"title":"Recuperação de Contexto","sidebarTitle":"Recuperação de Contexto","icon":"life-ring","href":"/pt/context/context-recovery"}]}]},{"group":"Modelos e provedores","icon":"shuffle","pages":[{"title":"Modelos de IA Suportados","sidebarTitle":"Modelos Suportados","icon":"microchip","href":"/pt/providers/supported-models"},{"title":"Autenticação OAuth","sidebarTitle":"Autenticação OAuth","icon":"key","href":"/pt/providers/oauth-authentication"},{"title":"AWS Bedrock","sidebarTitle":"AWS Bedrock","icon":"aws","href":"/pt/providers/bedrock"},{"title":"Provider Devin — o Devin CLI local como transporte LLM","sidebarTitle":"Provider Devin","icon":"robot","href":"/pt/providers/devin-provider"},{"title":"Fallback de Provedores","sidebarTitle":"Fallback de Provedores","icon":"rotate","href":"/pt/providers/provider-fallback"},{"title":"Rate Limits — visibilidade dos limites do provider","sidebarTitle":"Rate Limits","icon":"gauge-high","href":"/pt/providers/rate-limits"},{"title":"Cost Tracking","sidebarTitle":"Cost Tracking","icon":"money-bill-trend-up","href":"/pt/providers/cost-tracking"}]},{"group":"Ferramentas","icon":"toolbox","pages":[{"title":"WebFetch \u0026 WebSearch","sidebarTitle":"Web Tools","icon":"globe","href":"/pt/tools/web-tools"},{"title":"Automação de Navegador (@browser)","sidebarTitle":"Automação de Navegador","icon":"chrome","href":"/pt/tools/browser-automation"},{"title":"API Explorer (@api-explorer)","sidebarTitle":"API Explorer","icon":"compass","href":"/pt/tools/api-explorer"},{"title":"Git Forge (@forge)","sidebarTitle":"Git Forge","icon":"code-pull-request","href":"/pt/tools/git-forge"},{"title":"Geração e Edição de Imagem (@image)","sidebarTitle":"Geração \u0026 Edição de Imagem","icon":"image","href":"/pt/tools/image-generation"},{"title":"Diagramas (@diagram)","sidebarTitle":"Diagramas","icon":"diagram-project","href":"/pt/tools/diagram"},{"title":"Grafo interativo (@graphview)","sidebarTitle":"Grafo interativo","icon":"circle-nodes","href":"/pt/tools/graphview"},{"title":"Tags de Imagens (@registry-tags)","sidebarTitle":"Registry Tags","icon":"tags","href":"/pt/tools/registry-tags"},{"title":"Dados estruturados e diffs (@json, @diff)","sidebarTitle":"JSON \u0026 Diff","icon":"brackets-curly","href":"/pt/tools/json-diff"},{"title":"Aritmética de calendário (@date)","sidebarTitle":"Datas","icon":"calendar-days","href":"/pt/tools/date"},{"title":"Arquivos compactados (@archive)","sidebarTitle":"Arquivos compactados","icon":"file-zipper","href":"/pt/tools/archive"},{"title":"Skills Embutidas","sidebarTitle":"Skills Embutidas","icon":"boxes-stacked","href":"/pt/tools/builtin-skills"},{"title":"Scheduler (Chronos) — Agendamento durável","sidebarTitle":"Scheduler","icon":"clock","href":"/pt/tools/scheduler"}]},{"group":"Extensões","icon":"plug","pages":[{"title":"Sistema de Plugins","sidebarTitle":"Sistema de Plugins","icon":"plug","href":"/pt/extensions/plugin-system"},{"title":"Plugins de Provider","sidebarTitle":"Plugins de Provider","icon":"plug-circle-bolt","href":"/pt/extensions/provider-plugins"},{"title":"MCP (Model Context Protocol)","sidebarTitle":"Conectar MCP Servers","icon":"link","href":"/pt/extensions/mcp-integration"},{"title":"Skill Registry","sidebarTitle":"Skill Registry","icon":"store","tag":"NEW","href":"/pt/extensions/skill-registry"},{"title":"Auto-autoria de Skills (@skill)","sidebarTitle":"Auto-autoria de Skills","icon":"wand-magic-sparkles","href":"/pt/extensions/skill-authoring"},{"title":"Slash Commands","sidebarTitle":"Slash Commands","icon":"terminal","tag":"NEW","href":"/pt/extensions/slash-commands"},{"title":"Sistema de Hooks","sidebarTitle":"Hooks","icon":"webhook","href":"/pt/extensions/hooks-system"}]},{"group":"Canais e gateway","icon":"comments","pages":[{"title":"Chat gateway","sidebarTitle":"Chat gateway","icon":"messages","href":"/pt/gateway/chat-gateway"},{"title":"Telegram","icon":"telegram","href":"/pt/gateway/telegram"},{"title":"Slack","icon":"slack","href":"/pt/gateway/slack"},{"title":"Discord","icon":"discord","href":"/pt/gateway/discord"},{"title":"WhatsApp","icon":"whatsapp","href":"/pt/gateway/whatsapp"},{"title":"Webhook","icon":"webhook","href":"/pt/gateway/webhook"},{"title":"Conversation Hub — continuidade de conversa entre canais","sidebarTitle":"Conversation Hub","icon":"share-nodes","href":"/pt/gateway/conversation-hub"},{"title":"MCP Channels","sidebarTitle":"MCP Channels","icon":"tower-broadcast","href":"/pt/gateway/mcp-channels"},{"title":"Mensagens Proativas (@send)","sidebarTitle":"Mensagens Proativas","icon":"paper-plane","href":"/pt/gateway/proactive-messaging"},{"title":"Text-to-Speech \u0026 Voz no Gateway","sidebarTitle":"Text-to-Speech","icon":"volume-high","href":"/pt/gateway/text-to-speech"},{"title":"Respostas em Voz no Gateway","sidebarTitle":"Respostas em Voz","icon":"microphone","href":"/pt/gateway/voice-replies"}]},{"group":"Servidor e IDE","icon":"server","pages":[{"title":"Modo Servidor (chatcli server)","sidebarTitle":"Modo Servidor","icon":"server","href":"/pt/server/server-mode"},{"title":"Conexão Remota (chatcli connect)","sidebarTitle":"Conexão Remota","icon":"plug","href":"/pt/server/remote-connect"},{"title":"MCP Server — ChatCLI como servidor (e ACP)","sidebarTitle":"MCP Server do ChatCLI","icon":"server","href":"/pt/server/mcp-server"},{"title":"ACP — ChatCLI dentro da sua IDE","sidebarTitle":"ACP (Agente na IDE)","icon":"plug-circle-bolt","href":"/pt/server/acp"}]},{"group":"Kubernetes e AIOps","icon":"dharmachakra","pages":[{"title":"Monitoramento Kubernetes (K8s Watcher)","sidebarTitle":"K8s Watcher","icon":"binoculars","href":"/pt/kubernetes/k8s-watcher"},{"title":"Kubernetes Operator (AIOps)","sidebarTitle":"K8s Operator","icon":"dharmachakra","href":"/pt/kubernetes/k8s-operator"},{"title":"AIOps Platform (Deep-Dive)","sidebarTitle":"AIOps Platform","icon":"brain","href":"/pt/kubernetes/aiops-platform"},{"title":"ArtifactHub","sidebarTitle":"ArtifactHub","icon":"cube","href":"/pt/kubernetes/artifacthub"},{"group":"Plataforma AIOps","icon":"siren-on","pages":[{"title":"Ciclo de Vida do Incidente","sidebarTitle":"Ciclo de Vida","icon":"arrows-spin","href":"/pt/kubernetes/aiops/incident-lifecycle"},{"title":"Notificações e Escalação","sidebarTitle":"Notificações","icon":"bell","href":"/pt/kubernetes/aiops/notifications"},{"title":"SLOs e SLAs","sidebarTitle":"SLOs e SLAs","icon":"gauge-high","href":"/pt/kubernetes/aiops/slo-sla"},{"title":"Workflow de Aprovação","sidebarTitle":"Aprovações","icon":"shield-check","href":"/pt/kubernetes/aiops/approval-workflow"},{"title":"Motor de Decisão com IA","sidebarTitle":"Motor de Decisão","icon":"brain-circuit","href":"/pt/kubernetes/aiops/decision-engine"},{"title":"Federação Multi-Cluster","sidebarTitle":"Federação Multi-Cluster","icon":"network-wired","href":"/pt/kubernetes/aiops/federation"},{"title":"Chaos Engineering","sidebarTitle":"Chaos Engineering","icon":"explosion","href":"/pt/kubernetes/aiops/chaos-engineering"},{"title":"Auditoria e Compliance","sidebarTitle":"Auditoria e Compliance","icon":"clipboard-check","href":"/pt/kubernetes/aiops/audit-compliance"},{"title":"Capacity Planning e Cost Attribution","sidebarTitle":"Capacity \u0026 Custos","icon":"chart-line","href":"/pt/kubernetes/aiops/capacity-cost"},{"title":"Web Dashboard e Grafana","sidebarTitle":"Dashboard \u0026 Grafana","icon":"chart-mixed","href":"/pt/kubernetes/aiops/web-dashboard"}]}]},{"group":"Segurança","icon":"shield-halved","pages":[{"title":"Segurança Enterprise","sidebarTitle":"Segurança","icon":"shield-halved","href":"/pt/security/overview"},{"title":"Criptografia em Repouso","sidebarTitle":"Criptografia em Repouso","icon":"lock","href":"/pt/security/encryption-at-rest"},{"title":"Guia de atualização de segurança","sidebarTitle":"Atualização de segurança","icon":"shield-exclamation","href":"/pt/security/hardening-upgrade"},{"title":"Scan de Vulnerabilidades (@osv)","sidebarTitle":"Scan de Dependências","icon":"shield-halved","href":"/pt/security/dependency-scan"},{"title":"Scan de Segredos (@secrets)","sidebarTitle":"Scan de Segredos","icon":"key","href":"/pt/security/secrets-scan"}]},{"group":"Cookbook","icon":"kitchen-set","pages":[{"title":"Receita: Refatoração Segura com Modo Agente","sidebarTitle":"Refatoração com Agente","icon":"screwdriver-wrench","href":"/pt/cookbook/agent-refactoring"},{"title":"Corrigir testes com /coder","sidebarTitle":"Corrigir testes com /coder","icon":"vial","href":"/pt/cookbook/coder-fix-tests"},{"title":"Receita: Pegando uma Regressão com Evals","sidebarTitle":"Pegando uma Regressão com Evals","icon":"flask","href":"/pt/cookbook/eval-regression"},{"title":"Receita: Depurando Logs de Erro com Pipes","sidebarTitle":"Depurar Logs de Erro","icon":"bug","href":"/pt/cookbook/debugging-logs-with-pipes"},{"title":"One-Shot, Pipes e Automação","sidebarTitle":"One-Shot e Pipes","icon":"wand-magic-sparkles","href":"/pt/cookbook/oneshot-pipelines"},{"title":"Receita: Monitoramento K8s com IA","sidebarTitle":"Monitoramento K8s","icon":"chart-line","href":"/pt/cookbook/k8s-monitoring"},{"title":"Receita: Gerenciando Múltiplos Projetos com Contextos e Sessões","sidebarTitle":"Workflow Multi-Projeto","icon":"folder-tree","href":"/pt/cookbook/multi-project-workflow"},{"title":"Receita: Entendendo um Projeto de Código","sidebarTitle":"Entender Novo Projeto","icon":"rocket","href":"/pt/cookbook/onboarding-new-project"},{"title":"Receita: Gerando Release Notes com @git","sidebarTitle":"Gerar Release Notes","icon":"scroll","href":"/pt/cookbook/release-notes-automation"},{"title":"Receita: Servidor Remoto para Equipe","sidebarTitle":"Servidor para Equipe","icon":"network-wired","href":"/pt/cookbook/remote-server-setup"},{"title":"AIOps: Setup Produção Completo","sidebarTitle":"AIOps Production Setup","icon":"rocket","href":"/pt/cookbook/aiops-production-setup"},{"title":"Receita: Escalando Instances","sidebarTitle":"Escalando Instances","icon":"arrows-left-right","href":"/pt/cookbook/scaling-instances"},{"title":"AIOps: Guia de Resposta a Incidentes","sidebarTitle":"Incident Response","icon":"siren-on","href":"/pt/cookbook/aiops-incident-response"},{"title":"Hardening de Segurança para Produção","sidebarTitle":"Hardening de Segurança","icon":"lock","href":"/pt/cookbook/security-hardening-production"},{"title":"Automações com Scheduler","sidebarTitle":"Scheduler: automações","icon":"book-open","href":"/pt/cookbook/scheduler-automations"},{"title":"Receita: Debug Cross-Layer com 3 Bases de Conhecimento","sidebarTitle":"Debug Cross-Layer","icon":"diagram-project","href":"/pt/cookbook/cross-layer-knowledge-debug"}]},{"group":"Referência","icon":"rectangle-list","pages":[{"title":"Referência Completa de Comandos","sidebarTitle":"Referência de Comandos","icon":"rectangle-list","href":"/pt/reference/command-reference"},{"title":"Variáveis de Ambiente","sidebarTitle":"Variáveis de Ambiente","icon":"sliders","href":"/pt/reference/environment-variables"},{"title":"Referência de Configuração (.env)","sidebarTitle":"Configuração (.env)","icon":"gear","href":"/pt/reference/configuration"},{"title":"Configuração MCP (mcp_servers.json)","sidebarTitle":"MCP Config","icon":"gear","href":"/pt/reference/mcp-config"},{"title":"Arquitetura e Estrutura do Código","sidebarTitle":"Arquitetura","icon":"sitemap","href":"/pt/reference/architecture"},{"group":"REST API","icon":"code","pages":[{"group":"Introdução","icon":"compass","pages":[{"title":"Visão Geral da API","sidebarTitle":"Visão Geral","icon":"compass","href":"/pt/reference/api/overview"}]},{"group":"Incidents","icon":"siren-on","pages":[{"title":"Listar Incidentes","openapi":"GET /incidents","icon":"list","href":"/pt/reference/api/list-incidents"},{"title":"Obter Incidente","openapi":"GET /incidents/{name}","icon":"magnifying-glass","href":"/pt/reference/api/get-incident"},{"title":"Reconhecer Incidente","openapi":"POST /incidents/{name}/acknowledge","icon":"check","href":"/pt/reference/api/acknowledge-incident"},{"title":"Resolver Incidente","openapi":"POST /incidents/{name}/resolve","icon":"circle-check","href":"/pt/reference/api/resolve-incident"},{"title":"Adiar Incidente","openapi":"POST /incidents/{name}/snooze","icon":"clock","href":"/pt/reference/api/snooze-incident"},{"title":"Obter Timeline do Incidente","openapi":"GET /incidents/{name}/timeline","icon":"timeline","href":"/pt/reference/api/get-timeline"},{"title":"Obter Remediação do Incidente","openapi":"GET /incidents/{name}/remediation","icon":"wrench","href":"/pt/reference/api/get-remediation"}]},{"group":"AI Insights","icon":"lightbulb","pages":[{"title":"Listar AI Insights","openapi":"GET /aiinsights","icon":"list","href":"/pt/reference/api/list-aiinsights"},{"title":"Obter AI Insight","openapi":"GET /aiinsights/{name}","icon":"lightbulb","href":"/pt/reference/api/get-aiinsight"}]},{"group":"Remediations","icon":"wrench","pages":[{"title":"Listar Remediações","openapi":"GET /remediations","icon":"list","href":"/pt/reference/api/list-remediations"},{"title":"Obter Plano de Remediação","openapi":"GET /remediations/{name}","icon":"wrench","href":"/pt/reference/api/get-remediation-detail"}]},{"group":"Runbooks","icon":"book-open","pages":[{"title":"Listar Runbooks","openapi":"GET /runbooks","icon":"list","href":"/pt/reference/api/list-runbooks"},{"title":"Obter Runbook","openapi":"GET /runbooks/{name}","icon":"book-open","href":"/pt/reference/api/get-runbook"},{"title":"Criar Runbook","openapi":"POST /runbooks","icon":"plus","href":"/pt/reference/api/create-runbook"},{"title":"Atualizar Runbook","openapi":"PUT /runbooks/{name}","icon":"pen-to-square","href":"/pt/reference/api/update-runbook"},{"title":"Excluir Runbook","openapi":"DELETE /runbooks/{name}","icon":"trash","href":"/pt/reference/api/delete-runbook"}]},{"group":"Approvals","icon":"circle-check","pages":[{"title":"Listar Aprovações","openapi":"GET /approvals","icon":"list","href":"/pt/reference/api/list-approvals"},{"title":"Obter Aprovação","openapi":"GET /approvals/{name}","icon":"magnifying-glass","href":"/pt/reference/api/get-approval"},{"title":"Aprovar Solicitação","openapi":"POST /approvals/{name}/approve","icon":"circle-check","href":"/pt/reference/api/approve"},{"title":"Rejeitar Solicitação","openapi":"POST /approvals/{name}/reject","icon":"circle-xmark","href":"/pt/reference/api/reject"}]},{"group":"SLOs","icon":"gauge","pages":[{"title":"Listar SLOs","openapi":"GET /slos","icon":"list","href":"/pt/reference/api/list-slos"},{"title":"Obter SLO","openapi":"GET /slos/{name}","icon":"gauge","href":"/pt/reference/api/get-slo"},{"title":"Obter Error Budget do SLO","openapi":"GET /slos/{name}/budget","icon":"coins","href":"/pt/reference/api/get-slo-budget"}]},{"group":"PostMortems","icon":"magnifying-glass-chart","pages":[{"title":"Listar PostMortems","openapi":"GET /postmortems","icon":"list","href":"/pt/reference/api/list-postmortems"},{"title":"Obter PostMortem","openapi":"GET /postmortems/{name}","icon":"magnifying-glass","href":"/pt/reference/api/get-postmortem"},{"title":"Revisar PostMortem","openapi":"POST /postmortems/{name}/review","icon":"user-pen","href":"/pt/reference/api/review-postmortem"},{"title":"Feedback do Desenvolvedor","openapi":"POST /postmortems/{name}/feedback","icon":"comment","href":"/pt/reference/api/feedback-postmortem"},{"title":"Reconhecer Ação Humana","openapi":"POST /postmortems/{name}/ack-human-action","icon":"user-check","href":"/pt/reference/api/ack-human-action-postmortem"},{"title":"Fechar PostMortem","openapi":"POST /postmortems/{name}/close","icon":"lock","href":"/pt/reference/api/close-postmortem"}]},{"group":"Analytics","icon":"chart-line","pages":[{"title":"Resumo de Analytics","openapi":"GET /analytics/summary","icon":"chart-line","href":"/pt/reference/api/analytics-summary"},{"title":"Analytics MTTR","openapi":"GET /analytics/mttr","icon":"stopwatch","href":"/pt/reference/api/analytics-mttr"},{"title":"Analytics MTTD","openapi":"GET /analytics/mttd","icon":"stopwatch","href":"/pt/reference/api/analytics-mttd"},{"title":"Tendências de Analytics","openapi":"GET /analytics/trends","icon":"arrow-trend-up","href":"/pt/reference/api/analytics-trends"},{"title":"Top Recursos de Analytics","openapi":"GET /analytics/top-resources","icon":"ranking-star","href":"/pt/reference/api/analytics-top-resources"},{"title":"Estatísticas de Remediação","openapi":"GET /analytics/remediation-stats","icon":"chart-pie","href":"/pt/reference/api/analytics-remediation-stats"},{"title":"Compliance de Analytics","openapi":"GET /analytics/compliance","icon":"clipboard-check","href":"/pt/reference/api/analytics-compliance"},{"title":"Capacidade de Analytics","openapi":"GET /analytics/capacity","icon":"server","href":"/pt/reference/api/analytics-capacity"},{"title":"Custo","openapi":"GET /analytics/cost","icon":"coins","href":"/pt/reference/api/analytics-cost"}]},{"group":"Clusters","icon":"diagram-project","pages":[{"title":"Listar Clusters","openapi":"GET /clusters","icon":"list","href":"/pt/reference/api/list-clusters"},{"title":"Obter Cluster","openapi":"GET /clusters/{name}","icon":"diagram-project","href":"/pt/reference/api/get-cluster"},{"title":"Listar Políticas","openapi":"GET /policies/{kind}","icon":"list-check","href":"/pt/reference/api/list-policies"},{"title":"Obter Política","openapi":"GET /policies/{kind}/{name}","icon":"file-lines","href":"/pt/reference/api/get-policy"},{"title":"Status Global dos Clusters","openapi":"GET /clusters/global-status","icon":"globe","href":"/pt/reference/api/global-status"}]},{"group":"Federation","icon":"network-wired","pages":[{"title":"Status da Federação","openapi":"GET /federation/status","icon":"network-wired","href":"/pt/reference/api/federation-status"},{"title":"Clusters da Federação","openapi":"GET /federation/clusters","icon":"list","href":"/pt/reference/api/federation-clusters"},{"title":"Correlações da Federação","openapi":"GET /federation/correlations","icon":"diagram-project","href":"/pt/reference/api/federation-correlations"}]},{"group":"Audit","icon":"clipboard-check","pages":[{"title":"Listar Eventos de Auditoria","openapi":"GET /audit","icon":"list","href":"/pt/reference/api/list-audit"},{"title":"Exportar Auditoria","openapi":"GET /audit/export","icon":"file-export","href":"/pt/reference/api/export-audit"}]},{"group":"Health","icon":"heart-pulse","pages":[{"title":"Endpoints de Saúde","openapi":"GET /healthz","icon":"heart-pulse","href":"/pt/reference/api/health-endpoints"}]}]}]},{"group":"Releases","icon":"rocket","tag":"v1.232.1","pages":[{"title":"Notas de release","icon":"tag","href":"/pt/releases"},{"title":"v1.232.1","tag":"Mais recente","href":"/pt/releases/1.232.1"},{"title":"v1.232.0","href":"/pt/releases/1.232.0"},{"title":"v1.231.1","href":"/pt/releases/1.231.1"},{"title":"v1.231.0","href":"/pt/releases/1.231.0"},{"title":"v1.230.0","href":"/pt/releases/1.230.0"},{"title":"v1.229.0","href":"/pt/releases/1.229.0"},{"title":"v1.228.1","href":"/pt/releases/1.228.1"},{"title":"v1.228.0","href":"/pt/releases/1.228.0"},{"title":"v1.227.0","href":"/pt/releases/1.227.0"},{"title":"v1.226.0","href":"/pt/releases/1.226.0"}]},{"group":"Ajuda","icon":"life-ring","pages":[{"title":"Solução de Problemas","sidebarTitle":"Troubleshooting","icon":"life-ring","href":"/pt/help/troubleshooting"},{"title":"Contribuindo com o ChatCLI","sidebarTitle":"Contribuindo","icon":"code-pull-request","href":"/pt/help/contributing"}]}]}]}]},"basePath":"","title":"#4 RAG + HyDE — Retrieval Semântico - ChatCLI","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}