bgts-context-engine 0.2.1__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bgts_context_engine-0.2.3/CHANGELOG.md +312 -0
- {bgts_context_engine-0.2.1/src/bgts_context_engine.egg-info → bgts_context_engine-0.2.3}/PKG-INFO +32 -3
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/README.md +31 -2
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/README.tr.md +31 -2
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/__init__.py +1 -1
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/ui/trace.py +32 -112
- bgts_context_engine-0.2.3/src/bce/bench/pr_ablation.py +1435 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/bench/runner.py +1 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/cli.py +270 -4
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/config.py +39 -3
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/assembler/assembler.py +37 -1
- bgts_context_engine-0.2.3/src/bce/core/coverage/confidence.py +259 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/i18n/catalogs/en.json +3 -3
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/i18n/catalogs/tr.json +3 -3
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/orchestrator/__init__.py +4 -2
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/anchors.py +346 -0
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/bulk.py +117 -0
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/expand.py +383 -0
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/orchestrator.py +294 -0
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/profile.py +125 -0
- bgts_context_engine-0.2.3/src/bce/core/orchestrator/text.py +490 -0
- bgts_context_engine-0.2.3/src/bce/core/scoring/engine.py +327 -0
- bgts_context_engine-0.2.3/src/bce/indexing/churn.py +122 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/embedder/__init__.py +4 -0
- bgts_context_engine-0.2.3/src/bce/indexing/embedder/embedder.py +130 -0
- bgts_context_engine-0.2.3/src/bce/indexing/embedder/encoder.py +371 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/indexer.py +37 -2
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/graph/repository.py +401 -0
- bgts_context_engine-0.2.3/src/bce/storage/relational/migrations/0008_graph_label_indexes.sql +38 -0
- bgts_context_engine-0.2.3/src/bce/storage/relational/migrations/0009_fts_identifier_parts.sql +55 -0
- bgts_context_engine-0.2.3/src/bce/storage/relational/migrations/0010_file_churn.sql +21 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrator.py +64 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer3/orchestration.py +114 -63
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3/src/bgts_context_engine.egg-info}/PKG-INFO +32 -3
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bgts_context_engine.egg-info/SOURCES.txt +8 -0
- bgts_context_engine-0.2.1/CHANGELOG.md +0 -92
- bgts_context_engine-0.2.1/src/bce/core/coverage/confidence.py +0 -142
- bgts_context_engine-0.2.1/src/bce/core/orchestrator/anchors.py +0 -119
- bgts_context_engine-0.2.1/src/bce/core/orchestrator/expand.py +0 -167
- bgts_context_engine-0.2.1/src/bce/core/orchestrator/orchestrator.py +0 -77
- bgts_context_engine-0.2.1/src/bce/core/scoring/engine.py +0 -106
- bgts_context_engine-0.2.1/src/bce/indexing/embedder/embedder.py +0 -75
- bgts_context_engine-0.2.1/src/bce/indexing/embedder/encoder.py +0 -179
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/LICENSE +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/MANIFEST.in +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/pyproject.toml +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/setup.cfg +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/mcp/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/mcp/server.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/mcp/tools.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/app.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/deps.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/routes.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/schemas.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/static/assets/index-Cc4pUpSE.js +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/static/assets/index-DrLRaTMU.css +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/static/favicon.svg +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/static/index.html +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/ui/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/ui/queries.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/ui/router.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/api/rest/ui/schemas.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/bench/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/assembler/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/auth/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/auth/scope.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/coverage/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/i18n/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/i18n/locale.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/i18n/translator.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/logging.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/core/scoring/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/domain/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/domain/enums.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/domain/models.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/extractor/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/extractor/bridges.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/extractor/designnote.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/extractor/extractor.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/extractor/routes.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/gitsync/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/gitsync/bitbucket.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/gitsync/local.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/gitsync/remote.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/linker/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/linker/linker.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/_treesitter.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/base.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/csharp_provider.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/go_provider.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/java_provider.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/jsts_provider.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/languages/python_provider.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/registry.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/scip/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/scip/resolver.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/parser/symbol_id.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/upserter/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/indexing/upserter/upserter.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/jobs/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/jobs/store.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/jobs/worker.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/graph/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/graph/client.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/db.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0001_extensions_graph.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0002_relational.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0003_vector.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0004_rls.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0005_embeddings_dim.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0006_fts.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/migrations/0007_jobs.sql +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/relational/queries.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/vector/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/storage/vector/store.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer1/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer1/primitives.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer2/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer2/search.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bce/tools/layer3/__init__.py +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bgts_context_engine.egg-info/dependency_links.txt +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bgts_context_engine.egg-info/entry_points.txt +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bgts_context_engine.egg-info/requires.txt +0 -0
- {bgts_context_engine-0.2.1 → bgts_context_engine-0.2.3}/src/bgts_context_engine.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
|
|
6
|
+
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.2.3] - 2026-09-21
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `BCE_EMBEDDING_PROVIDER=openai`: an encoder that talks to any server speaking the OpenAI
|
|
15
|
+
`/v1/embeddings` protocol (vLLM, Text Embeddings Inference, Ollama, or OpenAI itself), using
|
|
16
|
+
only the standard library. This is how an open model such as `jinaai/jina-code-embeddings-1.5b`
|
|
17
|
+
runs on-prem. Query/document asymmetry is a text prefix — the jina-code family's `nl2code`
|
|
18
|
+
prompts are the default when the model name contains `jina-code`; anything else is unset
|
|
19
|
+
unless `BCE_EMBEDDING_QUERY_PREFIX` / `BCE_EMBEDDING_DOCUMENT_PREFIX` say otherwise.
|
|
20
|
+
`BCE_EMBEDDING_BASE_URL`, `BCE_EMBEDDING_API_KEY`, `BCE_EMBEDDING_EXTRA_BODY` (default
|
|
21
|
+
`{"truncate_prompt_tokens": -1}` so vLLM truncates instead of rejecting a long batch; set
|
|
22
|
+
`{}` for OpenAI's own API, which rejects unknown fields) and `BCE_EMBEDDING_TIMEOUT` (600 s)
|
|
23
|
+
configure the client. Vectors wider than `BCE_EMBEDDING_DIM` are truncated and re-normalised
|
|
24
|
+
(Matryoshka); a narrower reply is a configuration error. Transient 5xx / connection failures
|
|
25
|
+
retry three times; 4xx does not.
|
|
26
|
+
- Retrieval profiles (`bce.core.orchestrator.profile`): the three engine constants that encode
|
|
27
|
+
*where in the model's ranked list the right answers sit* — semantic-anchor rank scale, the
|
|
28
|
+
share of the answer reserved for the model's ranks, and a guard on its top ranks in
|
|
29
|
+
narrowing — grouped per embedding family. `BCE_RETRIEVAL_PROFILE=auto` (the default) picks
|
|
30
|
+
`voyage` for `voyage-*` and unknown models (the historical constants, unchanged) and `jina`
|
|
31
|
+
for `jina-*`. Name one to force it; `BCE_RETRIEVAL_SEMANTIC_GUARD_RANKS` /
|
|
32
|
+
`_RESERVE_SHARE` / `_RANK_SCALE` override a single knob for fitting runs. A profile change
|
|
33
|
+
never needs a re-index. The active profile is written into every `bce bench-prs` report.
|
|
34
|
+
- `bce migrate --reset-embeddings`: after the SQL migrations, `align_embedding_dim` re-types
|
|
35
|
+
`embeddings.embedding` to `BCE_EMBEDDING_DIM`. Stored vectors of another width are refused
|
|
36
|
+
unless the flag is set (they belong to another model and would be discarded); then the HNSW
|
|
37
|
+
index is rebuilt the same way migration `0005` did.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Narrowing reads the active retrieval profile. The voyage path is unchanged (no guard,
|
|
42
|
+
share 0.5). The jina profile adds a guard of 10: the model's first ten ranks fill slots
|
|
43
|
+
1–10 (only the container cap can skip one). jina-code finds more correct symbols than
|
|
44
|
+
voyage-code-4 but spreads them over ranks 1–15, and under the voyage constants the engine's
|
|
45
|
+
agreement with the model's *deeper* ranks satisfied the reserve share and pushed those mid
|
|
46
|
+
hits to positions 11–19 or out of the answer (PR replay, 30 PRs: recall@20 35.7 % → 38.2 %,
|
|
47
|
+
holdout 27.8 % → 34.9 %, retention of the model's own hits 83 % → 92 %). The list stays
|
|
48
|
+
K-monotonic.
|
|
49
|
+
- `bce bench-prs` titles the markdown with the encoder that actually produced the snapshots
|
|
50
|
+
(`jina-code-embeddings-1.5b vs … + BCE`), because the JSON key `voyage` is historical, not
|
|
51
|
+
the model.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- `bce bench-prs --from-report` / `--rerun-bce` no longer treats a stored semantic pool
|
|
56
|
+
shorter than K as incomplete. A task whose neighbours are mostly tests legitimately has a
|
|
57
|
+
pool shorter than K — the live run had nothing more either — so the check is now "non-empty
|
|
58
|
+
and at least as long as the list scored from it".
|
|
59
|
+
|
|
60
|
+
## [0.2.2] - 2026-09-18
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- `bce bench-prs prepare` / `run`: a PR replay ablation that measures what the engine adds on
|
|
65
|
+
top of the embedding model. Each merged PR is replayed against a database indexing the repo
|
|
66
|
+
at the PR's base commit; the title (+ description) is the task and the symbols the diff
|
|
67
|
+
touched in that snapshot are the ground truth. `voyage` (nearest non-test symbol embeddings),
|
|
68
|
+
`voyage_raw` and `bce` (the same neighbours as semantic anchors + explicit/lexical anchors,
|
|
69
|
+
expansion, scoring, narrowing) are scored with Recall/Precision/F1/MRR/Hit@K, a lenient
|
|
70
|
+
recall that credits enclosing symbols, file-level recall/precision, latency and a breakdown
|
|
71
|
+
of returned symbol kinds. `--from-report` re-scores stored result lists without querying.
|
|
72
|
+
`--tune` splits the PRs into a tune and a holdout half and reports each separately, so the
|
|
73
|
+
constants can be fitted on one half and quoted from the other; `--only` narrows a run to a
|
|
74
|
+
few PRs. Each `bce` case also reports `semantic_retention` (the share of the embedding
|
|
75
|
+
model's correct hits the engine still returns) and per-stage timings.
|
|
76
|
+
- `suggest_change_sites` returns a `timings` block (`semantic_ms`, `anchors_ms`, `expand_ms`,
|
|
77
|
+
`candidates_ms`, `score_ms`, `narrow_ms`, `enrich_ms`, `total_ms`); `trace=True` also returns
|
|
78
|
+
the ranked pool before narrowing (`ranked_ids`), for diagnostics.
|
|
79
|
+
- `bce bench-prs run --k 5,10,20` runs once at the largest K and reports every K as an extra
|
|
80
|
+
column (`metrics_at`) - exact because both lists are prefix chains (see narrowing below).
|
|
81
|
+
Each `bce` case carries a `truth_trace`: for every ground-truth symbol, the channel that
|
|
82
|
+
brought it in (`semantic` / `anchor` / `expansion` / none), the stage where it was lost
|
|
83
|
+
(`not_reached`, `narrowed_out`, `returned`), its rank in the model's list, in the scored pool
|
|
84
|
+
and in the answer. The report aggregates these per split and per K, together with a
|
|
85
|
+
task-text axis (`task_stats`: characters, content tokens, code identifiers in the PR text) so
|
|
86
|
+
a "no identifiers in the description" PR can be told from an engine miss. PRs whose diff
|
|
87
|
+
touches no symbol in the snapshot are scored at file level (`file_recall` / `file_precision`)
|
|
88
|
+
instead of being dropped. `--rerun-bce` replays the stored embedding neighbours and re-runs
|
|
89
|
+
only the engine, which turns a constants sweep from an API-bound run into ~100 s per split.
|
|
90
|
+
- `bce churn --repo --name [--commit] [--db-name]` (re)computes per-file git churn for an
|
|
91
|
+
indexed repository; the indexer records it on every run (migration `0010_file_churn`).
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- Retrieval scoring is now `scoring-v3`. Anchors carry an evidence *strength* in `[0, 1]`
|
|
96
|
+
(noisy-OR over the sources that nominated them) and the flat `+5.0` anchor floor became
|
|
97
|
+
`3.5 · strength`. On natural-language tasks the floor had split the pool into two disjoint
|
|
98
|
+
bands — every anchor above 7.3, every graph neighbour below 4.9 — so the top-N was the
|
|
99
|
+
highest-degree anchors regardless of evidence, and the functions that actually needed the
|
|
100
|
+
change ranked #25–#478. Proximity is `1 / (1 + distance)` (an anchor and its first hop no
|
|
101
|
+
longer score the same), centrality is log-scaled with weight 0.6 instead of 1.0, the leaf
|
|
102
|
+
penalty dropped from 1.5 to 0.5, unknown `ref_kind` / `provenance` now score at or below the
|
|
103
|
+
weakest known value, and test symbols lose 2.0.
|
|
104
|
+
- Scoring reads the evidence that *reached* a candidate, not only whether it is an anchor.
|
|
105
|
+
Proximity is multiplied by that evidence and the reference kind keeps half its weight
|
|
106
|
+
unconditionally (`3.0 · ref_kind · (0.5 + 0.5 · evidence)`), so a `define` edge off a generic
|
|
107
|
+
name like `Content` is no longer worth what one off the model's best hit is worth.
|
|
108
|
+
- New `w9_kind_prior` (2.0): method/function 1.0, class/struct/enum/property 0.5,
|
|
109
|
+
interface/constructor 0.4. A task describes a change, and the change lands in a body;
|
|
110
|
+
declarations and type shells are where it lives. Without the prior, a constructor reached
|
|
111
|
+
through a `define` edge outscored the anchor itself, and 28% of returned symbols were
|
|
112
|
+
containers against 10% in the diffs being replayed. `demote_redundant_containers` then
|
|
113
|
+
subtracts 1.5 from a container that already has a member in the top `2N`.
|
|
114
|
+
- Explicit-name resolution is discounted by ambiguity: evidence is `1.0 / √matches`, and a name
|
|
115
|
+
matching more than 8 symbols is dropped rather than seeding an anchor per match. A qualified
|
|
116
|
+
`Type.member` reference resolves inside its type and no longer *also* admits the bare tail
|
|
117
|
+
(which handed back the ambiguity the qualifier removed); with the type absent from the graph
|
|
118
|
+
the bare tail is used only while it has at most 3 matches. A member echoing its container's
|
|
119
|
+
name — a C# constructor, a partial-class helper — counts at half the container's evidence.
|
|
120
|
+
Generic member names in PR text (`Content`, `ExternalId`, `IsCancelled`) were the largest
|
|
121
|
+
single source of pool flooding: each resolved to every same-named symbol at full strength and
|
|
122
|
+
each expanded its own callers, referrers and file.
|
|
123
|
+
- Expansion is budgeted and evidence-carrying. It runs only from anchors with strength ≥ 0.3 and
|
|
124
|
+
at most the 20 strongest; weaker anchors stay in the pool at distance 0 unexpanded. Every node
|
|
125
|
+
records `source_strength`, the reaching anchor's strength decayed by 0.6 per hop.
|
|
126
|
+
- Anchor finding filters task text through an English + Turkish stop-word list (function words
|
|
127
|
+
and bug-report filler such as "fix", "missing", "check"), so "the" and "and" no longer produce
|
|
128
|
+
anchors. Only identifier-looking tokens (snake_case, camelCase, digits, ALL_CAPS, backticks,
|
|
129
|
+
`Class.method` tails) resolve as *explicit* symbol names; a plain English word cannot turn
|
|
130
|
+
`Principal.check` into an explicit anchor. The lexical source scores symbols by how many of the
|
|
131
|
+
task's terms they cover, weighted by term rarity, and keeps the best 15 instead of 5 hits per
|
|
132
|
+
term. The semantic source decays evidence hyperbolically with rank, `0.9 / (1 + rank/n)`, so
|
|
133
|
+
the model's #1 is comparable to a moderately ambiguous explicit name and the tail still
|
|
134
|
+
outweighs a lone saturated lexical hit. Rank remains the only model input: a similarity number
|
|
135
|
+
would let the model reorder candidates, which is the one thing the engine does not delegate.
|
|
136
|
+
- Test symbols (`tests/`, `test_*.py`, `*_test.go`, `*.test.ts`, `*Test.java`, ...) are excluded
|
|
137
|
+
from the lexical and semantic anchor sources; the automatic semantic anchor over-fetches and
|
|
138
|
+
keeps the first thirty non-test neighbours. `explicit` and `history` still admit them, and
|
|
139
|
+
`find_anchors(include_tests=True)` disables the filter.
|
|
140
|
+
- Same-file sibling expansion runs only from anchors with strength ≥ 0.7, nearest by line, at
|
|
141
|
+
most 12 per anchor, and never from a container — whose members already arrive through the
|
|
142
|
+
graph — so a weak single-term hit no longer drags its whole file into the pool.
|
|
143
|
+
- Retrieval is a single pass. Task signals are computed for every expanded candidate (with
|
|
144
|
+
partial credit for snake/camel parts, so `diff_command` lights up for "diff command"), rather
|
|
145
|
+
than only for the preliminary top `4 · N` — which, being all anchors, meant no neighbour could
|
|
146
|
+
ever receive one. Candidate features come from `GraphRepository.symbol_features`, five chunked
|
|
147
|
+
queries per 500 symbols instead of four round-trips per symbol.
|
|
148
|
+
- Narrowing builds the answer one slot at a time from two streams - the embedding model's ranks
|
|
149
|
+
and the engine's score order - and returns it in selection order, so `narrow(pool, n)` is
|
|
150
|
+
exactly the first `n` of `narrow(pool, n + 1)` (K-monotonic: a K=20 run can be cut to K=10,
|
|
151
|
+
and asking for more can no longer lose a symbol that K=10 had, which the proportional
|
|
152
|
+
`ceil(N · share)` budgets did - #856 in the 40-PR replay went from 100 % at K=10 to 50 % at
|
|
153
|
+
K=20). Position 1 is always the model's #1. Slot `i` goes to the model's next rank while fewer
|
|
154
|
+
than `i · 0.5` picks came from the model; an engine pick that is itself one of the model's
|
|
155
|
+
ranks counts toward that share, because the reserve exists to keep the model's ranks in the
|
|
156
|
+
answer and an agreed pick does exactly that (without this the streams alternated even when
|
|
157
|
+
they agreed and the engine's own hits sat at positions 10-14 instead of 5). Model picks are
|
|
158
|
+
exempt from the diversity caps; engine picks are capped at `ceil(i · 0.6)` per file and
|
|
159
|
+
`ceil(i · 0.3)` per container, containers overall at `ceil(i · 0.2)`. Two gates were tried on
|
|
160
|
+
the tune split and dropped: a score margin an engine pick had to clear over the model's next
|
|
161
|
+
rank (inert) and pre-emption of slot 1 by strong explicit anchors (a long PR description
|
|
162
|
+
names dozens of identifiers, so "explicit" is cheap there). The planned neighbour reserve was
|
|
163
|
+
dropped earlier for the same reason: evidence-scaled scoring already lets a real neighbour
|
|
164
|
+
outrank a weak anchor, and reserving slots for the best-scoring neighbour cost recall.
|
|
165
|
+
- Scoring is `scoring-v4`: `w10_semantic_rank` (1.0) adds `1 / (1 + rank)` for the model's
|
|
166
|
+
ranked list as an explicit factor, and `w11_churn` (1.0) adds a log-saturated prior from the
|
|
167
|
+
number of commits that touched the symbol's file in the last 500 (`file_churn`, filled by the
|
|
168
|
+
indexer from `git log` at the indexed commit - ancestors only, so a PR-base snapshot never sees
|
|
169
|
+
the PR's own commits). Diffs land where diffs have landed before; on the replay corpus most
|
|
170
|
+
indexed files have no commit in the window at all and a handful of hub files have 20-90, so
|
|
171
|
+
the prior separates the live part of a codebase from its sediment. The prior saturates at 20
|
|
172
|
+
commits.
|
|
173
|
+
- The semantic anchor's strength decays with the model's *absolute* rank,
|
|
174
|
+
`0.9 / (1 + rank / 30)`, instead of `rank / len(list)`, so widening the pool no longer makes
|
|
175
|
+
its tail stronger (rank 29 of a 30-list used to be worth as much as rank 10 of an 11-list),
|
|
176
|
+
and expansion is gated by the model's rank rather than by the list length. Steeper decays
|
|
177
|
+
(8 / 10 / 15) were measured and lost recall@20 and semantic retention.
|
|
178
|
+
- Full-text search tokenises identifiers (migration `0009_fts_identifier_parts`): the
|
|
179
|
+
`symbol_fts.document` is a weighted `tsvector` of the exact name (A), its camelCase /
|
|
180
|
+
snake_case parts (B), the container and file-stem words (C) and the signature / docstring
|
|
181
|
+
(D), so "meeting join" matches `MeetingJoinService` and a class name lends weight to its
|
|
182
|
+
members. Task-text tokenisation is Unicode-aware - Turkish words used to be split at the
|
|
183
|
+
first non-ASCII letter - with `İ` folded to `i`, so the Turkish stop-words finally apply, and
|
|
184
|
+
a Turkish -> English domain vocabulary (generic product / software words: "toplantı" ->
|
|
185
|
+
`meeting`, "takvim" -> `calendar`, "bildirim" -> `notification`, ...; suffixed forms are
|
|
186
|
+
recognised by a Turkish suffix-chain check so `serial`, `listener`, `indirect` are left
|
|
187
|
+
alone) feeds the lexical channel and the task-signal feature. No repository-specific names.
|
|
188
|
+
- `GraphRepository.symbol_features` reads degree and the caller / callee flags from the edge
|
|
189
|
+
label tables in SQL (`<graph>._ag_label_edge`, `<graph>."CALLS"`, both btree-indexed on
|
|
190
|
+
`start_id` / `end_id`) instead of Cypher. `MATCH (s)-[r]->()` expands the untyped pattern over
|
|
191
|
+
every edge x vertex label pair and re-plans it per `UNWIND` row: about 1 s of fixed cost for
|
|
192
|
+
an empty id list and 15-30 s for a 400-symbol pool, which was the entire `candidates` stage
|
|
193
|
+
(median 1 s, p90 15 s in the 40-PR replay). The SQL form measures 20-40 ms for the same pool
|
|
194
|
+
with identical counts; Cypher remains the fallback for clients without a raw connection.
|
|
195
|
+
- The embedder defers `embed_fragment` calls and flushes them in batches of up to 500 texts /
|
|
196
|
+
400k characters across files (`Embedder(defer=True)`, the indexer's default), so a run makes
|
|
197
|
+
a few dozen Voyage requests instead of one per file.
|
|
198
|
+
- Graph reads are batched: `callers_of`, `callees_of`, `referrers_of`, `supertypes_of`,
|
|
199
|
+
`subtypes_of`, `symbols_meta`, `symbols_in_files`, `repos_of_symbols`, `resolve_symbols` and
|
|
200
|
+
`lexical_search_many` all take id/term lists, and expansion consumes them frontier by
|
|
201
|
+
frontier (`src/bce/core/orchestrator/bulk.py`, which falls back to the per-symbol methods).
|
|
202
|
+
The bulk queries use `UNWIND $ids AS sid MATCH (s:Symbol {symbol_id: sid})` rather than
|
|
203
|
+
`WHERE s.symbol_id IN $ids`, which on Apache AGE measured about ten times faster. Together
|
|
204
|
+
with the expansion budget this took a long PR description from ~48 s to under 2 s.
|
|
205
|
+
- The confidence level is computed from anchor *agreement* — strong / corroborated anchors,
|
|
206
|
+
whether the top candidate is one, the share of weak single-source anchors and of test code in
|
|
207
|
+
the selection — instead of counting source tags across all anchors, which reported a pack of
|
|
208
|
+
eight noise anchors as `high`. Coverage gains `strong_anchor_count`,
|
|
209
|
+
`corroborated_anchor_count`, `anchor_agreement_ratio`, `weak_anchor_ratio`,
|
|
210
|
+
`max_anchor_strength`, `test_ratio` and `pool_size`.
|
|
211
|
+
- Context items carry `docstring`, `body`, `is_anchor`, `anchor_strength` and `is_test`;
|
|
212
|
+
bodies are loaded for the selected candidates only (`GraphRepository.get_symbol_detail`).
|
|
213
|
+
|
|
214
|
+
### Fixed
|
|
215
|
+
|
|
216
|
+
- The assembler treated `graph_distance == 0` as missing (`0 or 3`), so anchors were always
|
|
217
|
+
rendered reference-only instead of at full detail.
|
|
218
|
+
- Indexing slowed down quadratically with graph size. AGE creates a label table on its first
|
|
219
|
+
`MERGE` with only a primary key, so every edge upsert's `MATCH (a {gid: ...})` was a sequential
|
|
220
|
+
scan of the growing vertex tables (~24 ms per edge on a 15k-symbol graph, most of a 40-minute
|
|
221
|
+
index). Migration `0008_graph_label_indexes` now creates the vertex labels up front with a GIN
|
|
222
|
+
index on `properties` (`fastupdate = off`), which brings the lookup to ~2 ms and makes the
|
|
223
|
+
embedding calls the remaining cost.
|
|
224
|
+
- `VoyageEncoder` sent a whole file's symbols in one request; files with more than 1000 symbols
|
|
225
|
+
(or over the token ceiling) failed the index with `InvalidRequestError`. Requests are now split
|
|
226
|
+
into batches of at most 500 texts / 400k characters.
|
|
227
|
+
|
|
228
|
+
## [0.2.1] - 2026-09-11
|
|
229
|
+
|
|
230
|
+
### Added
|
|
231
|
+
|
|
232
|
+
- Indexing over MCP: `index_repo` and `reindex_repo`, plus the read-only `get_index_job` and
|
|
233
|
+
`list_index_jobs`. Both write tools take a local working tree and enqueue a job rather than
|
|
234
|
+
indexing inline, because a full index outlives any agent's tool-call timeout. They are gated
|
|
235
|
+
behind `BCE_MCP_ALLOW_WRITE` (default off) and are neither advertised nor dispatchable while
|
|
236
|
+
it is off. With it on, the MCP process also runs job workers, so queued indexing progresses
|
|
237
|
+
without a separate `bce serve`; the pool claims `index` and `reindex` only, so a clone that
|
|
238
|
+
REST enqueued is not run inside an editor-spawned process. Cloning a remote repository is
|
|
239
|
+
deliberately not exposed over MCP: it carries its own credentials and stays on REST and the CLI.
|
|
240
|
+
- `JobWorkerPool(job_types=...)` and `claim_next_job(job_types=...)` restrict a pool to a subset
|
|
241
|
+
of the queue.
|
|
242
|
+
- `bce --env-file PATH` and `BCE_ENV_FILE` load configuration from an explicit `.env`. Editors
|
|
243
|
+
spawn `bce serve-mcp` from their own working directory, so a bare `.env` was never found and the
|
|
244
|
+
MCP server silently ran on defaults — no Voyage key, no database password. `serve` and
|
|
245
|
+
`serve-mcp` accept the option after the command name as well as before it, because that is how
|
|
246
|
+
an MCP config or a service definition is written.
|
|
247
|
+
|
|
248
|
+
### Changed
|
|
249
|
+
|
|
250
|
+
- The MCP catalog is now eight read-only tools instead of fourteen. Removed `semantic_search`,
|
|
251
|
+
`find_similar_code`, `find_implementers`, `get_type_hierarchy`, `get_dependencies`,
|
|
252
|
+
`suggest_change_sites`, `select_repos` and `assemble_context`: an agent picks worse when
|
|
253
|
+
handed a dozen overlapping retrieval tools, and `hybrid_search` and `get_context_for_task`
|
|
254
|
+
already cover what they did. All of them remain available over REST.
|
|
255
|
+
- The optional `mcp` extra is now `mcp>=1.0,<2`. SDK 2.x dropped `Server.list_tools` /
|
|
256
|
+
`Server.call_tool`, so `bce serve-mcp` failed on a default `pip install` of 2.x.
|
|
257
|
+
|
|
258
|
+
### Fixed
|
|
259
|
+
|
|
260
|
+
- The first search on an MCP server no longer hangs. Building the embedding encoder imports
|
|
261
|
+
numpy, and loading that extension lazily from inside a tool call stalled for over three
|
|
262
|
+
minutes on Windows while the same import costs seconds at process start, so the encoder is
|
|
263
|
+
now built during startup. Tool dispatch also moved off the event loop onto a worker thread,
|
|
264
|
+
since its database and HTTP calls are synchronous.
|
|
265
|
+
- The MCP server configures logging, against stderr because stdout carries the protocol. Its job
|
|
266
|
+
worker's failures previously fell through to Python's last-resort handler and surfaced in editor
|
|
267
|
+
logs as bare tracebacks; they are now the same JSON lines the API server emits, and they reach
|
|
268
|
+
the log file too. `setup_logging(stream=...)` makes the console destination overridable.
|
|
269
|
+
|
|
270
|
+
## [0.2.0] - 2026-09-10
|
|
271
|
+
|
|
272
|
+
### Changed
|
|
273
|
+
|
|
274
|
+
- Both READMEs now reference images, videos and sibling documents by absolute URL. PyPI
|
|
275
|
+
renders the long description outside the repository, so relative paths resolved to
|
|
276
|
+
nothing there: the banner was a broken image and every documentation link a dead one.
|
|
277
|
+
- Selecting `BCE_EMBEDDING_PROVIDER=voyage` without its API key no longer falls back to the
|
|
278
|
+
hashing encoder. Both that case and a missing `voyageai` package now raise
|
|
279
|
+
`EncoderConfigError`, which the CLI reports as a single line and the REST API as `503`.
|
|
280
|
+
A substituted encoder is not detectable by nearest-neighbour search, so it returned bad
|
|
281
|
+
anchors instead of an error. An unrecognised provider name is rejected the same way.
|
|
282
|
+
- Removed `Settings.voyage_ready`, whose "ready" no longer matched how the encoder is
|
|
283
|
+
chosen.
|
|
284
|
+
|
|
285
|
+
## [0.1.0] - 2026-09-08
|
|
286
|
+
|
|
287
|
+
First public release.
|
|
288
|
+
|
|
289
|
+
### Added
|
|
290
|
+
|
|
291
|
+
- Deterministic retrieval pipeline: anchor discovery, graph expansion, scoring, narrowing
|
|
292
|
+
and context assembly, with coverage and confidence reporting.
|
|
293
|
+
- Code graph over PostgreSQL with Apache AGE and pgvector in a single database. Layer-3
|
|
294
|
+
results are filtered per user against the `scopes` table, resolved from the
|
|
295
|
+
`X-BCE-User` header.
|
|
296
|
+
- Tree-sitter indexing for Python, JavaScript and TypeScript, with optional grammars for
|
|
297
|
+
Java, C# and Go. Incremental re-indexing driven by `git diff`.
|
|
298
|
+
- Layer 1, 2 and 3 tool surfaces exposed over both REST and MCP.
|
|
299
|
+
- Web interface at `/ui`: a graph explorer and a player that replays each pipeline stage
|
|
300
|
+
for a given task. Ships inside the wheel; English by default with a Turkish catalog.
|
|
301
|
+
- `bce` command line interface: `migrate`, `index`, `index-remote`, `reindex`, `bench`,
|
|
302
|
+
`resolve-symbol`, `find-references`, `languages`, `serve` and `serve-mcp`.
|
|
303
|
+
- Benchmark harness reporting latency, recall, precision and determinism.
|
|
304
|
+
- Docker Compose deployment with PostgreSQL, Apache AGE and pgvector preconfigured.
|
|
305
|
+
- `server.json` manifest describing the stdio server for the official MCP registry.
|
|
306
|
+
|
|
307
|
+
[Unreleased]: https://github.com/bgts-ai-org/bgts-context-engine/compare/v0.2.3...HEAD
|
|
308
|
+
[0.2.3]: https://github.com/bgts-ai-org/bgts-context-engine/compare/v0.2.2...v0.2.3
|
|
309
|
+
[0.2.2]: https://github.com/bgts-ai-org/bgts-context-engine/compare/v0.2.1...v0.2.2
|
|
310
|
+
[0.2.1]: https://github.com/bgts-ai-org/bgts-context-engine/compare/v0.2.0...v0.2.1
|
|
311
|
+
[0.2.0]: https://github.com/bgts-ai-org/bgts-context-engine/compare/v0.1.0...v0.2.0
|
|
312
|
+
[0.1.0]: https://github.com/bgts-ai-org/bgts-context-engine/releases/tag/v0.1.0
|
{bgts_context_engine-0.2.1/src/bgts_context_engine.egg-info → bgts_context_engine-0.2.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bgts-context-engine
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Deterministic code-graph context engine for AI coding agents - PostgreSQL, Apache AGE and pgvector, over MCP and REST
|
|
5
5
|
Author: Oğuz Öztürk, Enes İyidil
|
|
6
6
|
Maintainer: BGTS
|
|
@@ -69,7 +69,7 @@ that actually answer it — ranked, budgeted, and reproducible.
|
|
|
69
69
|
[](docs/mcp.md)
|
|
70
70
|
[](https://github.com/bgts-ai-org/bgts-context-engine/stargazers)
|
|
71
71
|
|
|
72
|
-
[Quick start](#quick-start) · [Use it from your agent](#use-it-from-your-agent) · [How it works](#how-it-works) · [Documentation](#documentation) · [Türkçe](README.tr.md)
|
|
72
|
+
[Quick start](#quick-start) · [Use it from your agent](#use-it-from-your-agent) · [How it works](#how-it-works) · [Supported models](#supported-models) · [Documentation](#documentation) · [Türkçe](README.tr.md)
|
|
73
73
|
|
|
74
74
|
</div>
|
|
75
75
|
|
|
@@ -294,7 +294,36 @@ The full formula, every weight, and the confidence thresholds are in
|
|
|
294
294
|
- **A UI that explains itself.** `/ui` ships in the wheel and replays a real retrieval call
|
|
295
295
|
stage by stage: anchors lighting up, expansion spreading, candidates scored and cut.
|
|
296
296
|
- **Runs offline.** The default embedding provider is deterministic arithmetic over token
|
|
297
|
-
digests. No API key, no network, repeatable benchmarks.
|
|
297
|
+
digests. No API key, no network, repeatable benchmarks. `openai` talks to any
|
|
298
|
+
OpenAI-compatible `/v1/embeddings` server (vLLM, TEI, Ollama), so a model such as
|
|
299
|
+
[jina-code-embeddings-1.5b](https://huggingface.co/jinaai/jina-code-embeddings-1.5b)
|
|
300
|
+
can run inside the perimeter.
|
|
301
|
+
|
|
302
|
+
## Supported models
|
|
303
|
+
|
|
304
|
+
Embeddings only find entry points when the task text names nothing the graph already
|
|
305
|
+
knows. They never rank the answer. Out of the box that seed is `hashing`: deterministic
|
|
306
|
+
arithmetic, no API key, no network. For a real code model, set `BCE_EMBEDDING_PROVIDER`
|
|
307
|
+
and `BCE_EMBEDDING_MODEL` to one of these:
|
|
308
|
+
|
|
309
|
+
| Model | Provider | Dimension |
|
|
310
|
+
| --- | --- | --- |
|
|
311
|
+
| [`voyage-code-3`](https://blog.voyageai.com/2024/12/04/voyage-code-3/) | Voyage AI (`voyage`) | 1024 |
|
|
312
|
+
| [`voyage-code-4`](https://blog.voyageai.com/2026/08/13/voyage-code-4/) | Voyage AI (`voyage`) | 1024 |
|
|
313
|
+
| [`jina-code-embeddings-1.5b`](https://huggingface.co/jinaai/jina-code-embeddings-1.5b) | OpenAI-compatible (`openai`) | 1536 |
|
|
314
|
+
|
|
315
|
+
Voyage is a hosted API — `pip install "bgts-context-engine[embed]"` and
|
|
316
|
+
`BCE_VOYAGE_API_KEY`. Jina is the on-prem path: any server that speaks `/v1/embeddings`
|
|
317
|
+
(vLLM, TEI, Ollama). Switching the model or the dimension is a re-index
|
|
318
|
+
(`bce migrate --reset-embeddings`). The knobs are in
|
|
319
|
+
[docs/deployment.md](docs/deployment.md).
|
|
320
|
+
|
|
321
|
+
**Coming next** — same `openai` socket, not yet a fitted retrieval profile:
|
|
322
|
+
|
|
323
|
+
- [`jina-code-embeddings-0.5b`](https://huggingface.co/jinaai/jina-code-embeddings-0.5b)
|
|
324
|
+
— the smaller sibling of 1.5b, for hosts that cannot hold 1.5B parameters.
|
|
325
|
+
- [`Nomic Embed Code`](https://huggingface.co/nomic-ai/nomic-embed-code) — an open 7B
|
|
326
|
+
code retriever.
|
|
298
327
|
|
|
299
328
|
## Where it fits
|
|
300
329
|
|
|
@@ -16,7 +16,7 @@ that actually answer it — ranked, budgeted, and reproducible.
|
|
|
16
16
|
[](docs/mcp.md)
|
|
17
17
|
[](https://github.com/bgts-ai-org/bgts-context-engine/stargazers)
|
|
18
18
|
|
|
19
|
-
[Quick start](#quick-start) · [Use it from your agent](#use-it-from-your-agent) · [How it works](#how-it-works) · [Documentation](#documentation) · [Türkçe](README.tr.md)
|
|
19
|
+
[Quick start](#quick-start) · [Use it from your agent](#use-it-from-your-agent) · [How it works](#how-it-works) · [Supported models](#supported-models) · [Documentation](#documentation) · [Türkçe](README.tr.md)
|
|
20
20
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
@@ -241,7 +241,36 @@ The full formula, every weight, and the confidence thresholds are in
|
|
|
241
241
|
- **A UI that explains itself.** `/ui` ships in the wheel and replays a real retrieval call
|
|
242
242
|
stage by stage: anchors lighting up, expansion spreading, candidates scored and cut.
|
|
243
243
|
- **Runs offline.** The default embedding provider is deterministic arithmetic over token
|
|
244
|
-
digests. No API key, no network, repeatable benchmarks.
|
|
244
|
+
digests. No API key, no network, repeatable benchmarks. `openai` talks to any
|
|
245
|
+
OpenAI-compatible `/v1/embeddings` server (vLLM, TEI, Ollama), so a model such as
|
|
246
|
+
[jina-code-embeddings-1.5b](https://huggingface.co/jinaai/jina-code-embeddings-1.5b)
|
|
247
|
+
can run inside the perimeter.
|
|
248
|
+
|
|
249
|
+
## Supported models
|
|
250
|
+
|
|
251
|
+
Embeddings only find entry points when the task text names nothing the graph already
|
|
252
|
+
knows. They never rank the answer. Out of the box that seed is `hashing`: deterministic
|
|
253
|
+
arithmetic, no API key, no network. For a real code model, set `BCE_EMBEDDING_PROVIDER`
|
|
254
|
+
and `BCE_EMBEDDING_MODEL` to one of these:
|
|
255
|
+
|
|
256
|
+
| Model | Provider | Dimension |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| [`voyage-code-3`](https://blog.voyageai.com/2024/12/04/voyage-code-3/) | Voyage AI (`voyage`) | 1024 |
|
|
259
|
+
| [`voyage-code-4`](https://blog.voyageai.com/2026/08/13/voyage-code-4/) | Voyage AI (`voyage`) | 1024 |
|
|
260
|
+
| [`jina-code-embeddings-1.5b`](https://huggingface.co/jinaai/jina-code-embeddings-1.5b) | OpenAI-compatible (`openai`) | 1536 |
|
|
261
|
+
|
|
262
|
+
Voyage is a hosted API — `pip install "bgts-context-engine[embed]"` and
|
|
263
|
+
`BCE_VOYAGE_API_KEY`. Jina is the on-prem path: any server that speaks `/v1/embeddings`
|
|
264
|
+
(vLLM, TEI, Ollama). Switching the model or the dimension is a re-index
|
|
265
|
+
(`bce migrate --reset-embeddings`). The knobs are in
|
|
266
|
+
[docs/deployment.md](docs/deployment.md).
|
|
267
|
+
|
|
268
|
+
**Coming next** — same `openai` socket, not yet a fitted retrieval profile:
|
|
269
|
+
|
|
270
|
+
- [`jina-code-embeddings-0.5b`](https://huggingface.co/jinaai/jina-code-embeddings-0.5b)
|
|
271
|
+
— the smaller sibling of 1.5b, for hosts that cannot hold 1.5B parameters.
|
|
272
|
+
- [`Nomic Embed Code`](https://huggingface.co/nomic-ai/nomic-embed-code) — an open 7B
|
|
273
|
+
code retriever.
|
|
245
274
|
|
|
246
275
|
## Where it fits
|
|
247
276
|
|
|
@@ -14,7 +14,7 @@ veren sekiz sembolü sıralanmış, bütçelenmiş ve yeniden üretilebilir şek
|
|
|
14
14
|
[](docs/mcp.md)
|
|
15
15
|
[](https://github.com/bgts-ai-org/bgts-context-engine/stargazers)
|
|
16
16
|
|
|
17
|
-
[Hızlı başlangıç](#hızlı-başlangıç) · [Ajanınızdan kullanma](#ajanınızdan-kullanma) · [Nasıl çalışır](#nasıl-çalışır) · [Dokümantasyon](#dokümantasyon) · [English](README.md)
|
|
17
|
+
[Hızlı başlangıç](#hızlı-başlangıç) · [Ajanınızdan kullanma](#ajanınızdan-kullanma) · [Nasıl çalışır](#nasıl-çalışır) · [Desteklenen modeller](#desteklenen-modeller) · [Dokümantasyon](#dokümantasyon) · [English](README.md)
|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -245,7 +245,36 @@ Formülün tamamı, her ağırlık ve güven eşikleri
|
|
|
245
245
|
aşama aşama oynatır: çapaların yanması, genişlemenin yayılması, adayların skorlanıp
|
|
246
246
|
kesilmesi.
|
|
247
247
|
- **Çevrimdışı çalışır.** Varsayılan embedding sağlayıcısı, token özetleri üzerinde
|
|
248
|
-
deterministik aritmetiktir. API anahtarı yok, ağ yok, tekrarlanabilir ölçümler.
|
|
248
|
+
deterministik aritmetiktir. API anahtarı yok, ağ yok, tekrarlanabilir ölçümler. `openai`
|
|
249
|
+
sağlayıcısı OpenAI uyumlu herhangi bir `/v1/embeddings` sunucusuna konuşur (vLLM, TEI,
|
|
250
|
+
Ollama); [jina-code-embeddings-1.5b](https://huggingface.co/jinaai/jina-code-embeddings-1.5b)
|
|
251
|
+
gibi bir model çevre içinde çalışır.
|
|
252
|
+
|
|
253
|
+
## Desteklenen modeller
|
|
254
|
+
|
|
255
|
+
Embedding yalnızca grafın tanımadığı bir görev metninde giriş noktası bulur. Cevabı asla
|
|
256
|
+
sıralamaz. Varsayılan `hashing`'dir: deterministik aritmetik, API anahtarı yok, ağ yok.
|
|
257
|
+
Gerçek bir kod modeli için `BCE_EMBEDDING_PROVIDER` ve `BCE_EMBEDDING_MODEL`'i şunlardan
|
|
258
|
+
birine ayarlayın:
|
|
259
|
+
|
|
260
|
+
| Model | Sağlayıcı | Boyut |
|
|
261
|
+
| --- | --- | --- |
|
|
262
|
+
| [`voyage-code-3`](https://blog.voyageai.com/2024/12/04/voyage-code-3/) | Voyage AI (`voyage`) | 1024 |
|
|
263
|
+
| [`voyage-code-4`](https://blog.voyageai.com/2026/08/13/voyage-code-4/) | Voyage AI (`voyage`) | 1024 |
|
|
264
|
+
| [`jina-code-embeddings-1.5b`](https://huggingface.co/jinaai/jina-code-embeddings-1.5b) | OpenAI uyumlu (`openai`) | 1536 |
|
|
265
|
+
|
|
266
|
+
Voyage barındırılan bir API'dir — `pip install "bgts-context-engine[embed]"` ve
|
|
267
|
+
`BCE_VOYAGE_API_KEY`. Jina çevre-içi yoldur: `/v1/embeddings` konuşan herhangi bir
|
|
268
|
+
sunucu (vLLM, TEI, Ollama). Model veya boyutu değiştirmek yeniden indekslemedir
|
|
269
|
+
(`bce migrate --reset-embeddings`). Ayarlar
|
|
270
|
+
[docs/deployment.md](docs/deployment.md) içindedir.
|
|
271
|
+
|
|
272
|
+
**Sırada** — aynı `openai` soketi, henüz ayrı bir getirme profili yok:
|
|
273
|
+
|
|
274
|
+
- [`jina-code-embeddings-0.5b`](https://huggingface.co/jinaai/jina-code-embeddings-0.5b)
|
|
275
|
+
— 1.5b'nin küçük kardeşi; 1.5B parametreyi taşıyamayan makineler için.
|
|
276
|
+
- [`Nomic Embed Code`](https://huggingface.co/nomic-ai/nomic-embed-code) — açık kaynaklı
|
|
277
|
+
7B kod getiricisi.
|
|
249
278
|
|
|
250
279
|
## Nereye oturur
|
|
251
280
|
|