Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
4b47d89
docs(backlog): reconcile v0.4.0 completions and add v0.5 entries
fvadicamo Apr 18, 2026
c6db57f
docs(plans): add v0.5.0 implementation plan
fvadicamo Apr 18, 2026
41eea9c
feat(admin): add PATCH /api/v1/namespaces/{id}/config for instructor …
fvadicamo Apr 21, 2026
192b62c
feat(core): add document_name to source citations (WI-2, FEAT-012)
fvadicamo Apr 21, 2026
4675445
feat(learn): add JWT-scoped GET /conversations/{id}/turns (WI-1, FEAT…
fvadicamo Apr 21, 2026
5e12eb1
feat(widget): white-label data-attrs for course customization (WI-4, …
fvadicamo Apr 21, 2026
baf77b1
feat(widget): conversation persistence + New chat button (WI-5, FEAT-…
fvadicamo Apr 21, 2026
bcbde1a
docs(v0.5.0): update BACKLOG and CHANGELOG for widget + prof config
fvadicamo Apr 21, 2026
45437c8
fix(core): populate document_name in AdvancedQueryPipeline.execute_st…
fvadicamo Apr 21, 2026
e787cc4
fix(v0.5.0): archived marker, learn audit log, namespace PATCH route
fvadicamo Apr 21, 2026
bda675b
fix(v0.5.0): powered-by customization, restore race, fetch timeout, t…
fvadicamo Apr 21, 2026
dfe6be5
fix(learn): always emit turns-read audit even without request_id (CR-…
fvadicamo Apr 21, 2026
c8e72f8
fix(widget): preserve --vektra-primary on hover (CR-3120130903, Gemin…
fvadicamo Apr 21, 2026
18af4f3
fix(core): normalize document_name lookup keys to str (CR-3120130886)
fvadicamo Apr 21, 2026
86e5330
style(v0.5.0): address minor review comments (CR + Gemini)
fvadicamo Apr 21, 2026
c57e5f5
docs(backlog): track deferred items from PR #66 review
fvadicamo Apr 21, 2026
f4dbecd
fix(widget): lock input while restoring conversation history (CR new …
fvadicamo Apr 21, 2026
6ff6d0d
feat(core): record document_names step in QueryTrace (CR new round)
fvadicamo Apr 21, 2026
5433a0d
chore: bump version to 0.5.0-dev across all submodules
fvadicamo Apr 21, 2026
15bc683
Merge pull request #66 from vektralabs/feat/v050-widget-and-prof-config
fvadicamo Apr 21, 2026
9114310
feat(backend): configurable source citation visibility (FEAT-014)
fvadicamo Apr 22, 2026
ad2741b
feat(widget): wire data-show-sources override + server-driven default…
fvadicamo Apr 22, 2026
17bc430
docs(feat-014): source citation visibility end-to-end
fvadicamo Apr 22, 2026
f9b4ccb
refactor(admin): derive ALLOWED_CONFIG_KEYS from validation maps
fvadicamo Apr 24, 2026
7951412
fix(widget): trim data-show-sources before lowercase comparison
fvadicamo Apr 24, 2026
c806afc
test(admin): cover resolve_show_sources end-to-end via PATCH
fvadicamo Apr 24, 2026
843eaaa
feat(admin): GET /admin/namespaces/{id}/config symmetric to PATCH
fvadicamo Apr 24, 2026
4377360
refactor(admin): derive _resolved_from_stored from whitelist maps
fvadicamo Apr 24, 2026
574e009
Merge pull request #69 from vektralabs/feat/v050-feat-014-sources-vis…
fvadicamo Apr 25, 2026
69a5087
chore(release): finalize v0.5.0
fvadicamo Apr 25, 2026
254f7ae
docs(changelog): adopt always-on [Unreleased] per Keep a Changelog 1.1.0
fvadicamo Apr 25, 2026
64a9b04
docs(v0.5.0): align reference and READMEs with widget + namespace config
fvadicamo Apr 25, 2026
43315c0
docs(v0.5.0): fix widget URL and clarify nullability
fvadicamo Apr 25, 2026
d52c625
docs(v0.5.0): close remaining audit gaps before release
fvadicamo Apr 26, 2026
be7d9e7
docs(learn): fix endpoint scope table in README
fvadicamo Apr 26, 2026
6347ccd
docs(v0.5.0): close LOW residual + fix architecture/index.md drift
fvadicamo Apr 26, 2026
d816ae0
docs(v0.5.0): correct architecture index and resolver signatures
fvadicamo Apr 26, 2026
66c1fdf
docs(v0.5.0): close remaining drift in component READMEs and indexes
fvadicamo Apr 26, 2026
9bdc266
docs(v0.5.0): align EventEmitter and analytics endpoint refs with code
fvadicamo Apr 26, 2026
c9af8d0
docs(v0.5.0): tighten analytics and ingest README claims
fvadicamo Apr 26, 2026
0985546
docs(vektra-shared): correct startup helpers description
fvadicamo Apr 26, 2026
05f57fb
docs(branding): adopt "Vektra RAG" as user-facing product name
fvadicamo Apr 26, 2026
0300086
docs(branding): align bug report and gemini styleguide to "Vektra RAG"
fvadicamo Apr 26, 2026
c6e075d
feat(v050): widget label "VektraLabs" + consolidated integration guide
fvadicamo Apr 26, 2026
e1667ab
fix(docs): correct token endpoint signature in widget guide + JSDoc
fvadicamo Apr 26, 2026
3533fa6
fix(docs): escape HTML interpolation in FastAPI widget example
fvadicamo Apr 26, 2026
6c2e1a7
docs(guides): fix anchor links to FEAT-suffixed section IDs
fvadicamo Apr 26, 2026
fb987ba
Merge pull request #70 from vektralabs/chore/v0.5.0-release
fvadicamo Apr 26, 2026
06457cb
docs(backlog): track v0.5.0 release-PR review feedback
fvadicamo Apr 26, 2026
855bebd
docs(backlog): broaden DEBT-020 scope and multi-provider DEBT-021
fvadicamo Apr 26, 2026
1ddcd7d
Merge pull request #72 from vektralabs/docs/backlog-v050-pr71-feedback
fvadicamo Apr 26, 2026
506e5df
chore(deps): bump the uv group across 1 directory with 11 updates
dependabot[bot] Apr 21, 2026
59a9541
chore(deps-dev): Bump esbuild
dependabot[bot] Mar 15, 2026
c617623
fix(v0.5.0): widget root scope, audit fallback, test naming, lockfile
fvadicamo Apr 27, 2026
642f65a
docs(changelog): document v0.5.0 hardening (DEBT-018/020 + deps)
fvadicamo Apr 27, 2026
f5c996a
fix(ingest): apply DEBT-020 audit fallback to vektra-ingest writers
fvadicamo Apr 27, 2026
8fa101c
test(admin): drop unused caplog fixture from helper unit test
fvadicamo Apr 27, 2026
ff2a745
style(v0.5.0): nitpicks from PR #73 review (CodeRabbit)
fvadicamo Apr 27, 2026
9ec7577
fix(admin): also use cached is_bootstrap at consume_bootstrap_key call
fvadicamo Apr 27, 2026
25428d3
Merge pull request #73 from vektralabs/chore/v0.5.0-finalize
fvadicamo Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
# Example: VEKTRA_LLM_API_BASE=http://localhost:8000/v1
# VEKTRA_LLM_API_BASE=

# Extra JSON body forwarded to litellm. Useful for vLLM thinking models
# (Qwen3.5, DeepSeek-R1) to disable thinking mode.
# Example: VEKTRA_LLM_EXTRA_BODY={"chat_template_kwargs": {"enable_thinking": false}}
# VEKTRA_LLM_EXTRA_BODY=

# Or set provider-specific keys directly:
# OPENAI_API_KEY=sk-...
# ANTHROPIC_API_KEY=sk-ant-...
Expand Down Expand Up @@ -83,6 +88,12 @@
# VEKTRA_CONTEXT_CHUNK_RATIO=0.6
# VEKTRA_PROMPT_TEMPLATES_DIR=

# Default RAG grounding policy. Per-namespace override via
# PATCH /api/v1/admin/namespaces/{id}/config.
# strict - answer from retrieved context + history only
# hybrid - fall back to model knowledge when confident
# VEKTRA_PROMPT_GROUNDING_MODE=strict

# Query rewriting (AdvancedQueryPipeline)
# VEKTRA_QUERY_REWRITE_ENABLED=true
# VEKTRA_QUERY_REWRITE_MODEL=
Expand Down Expand Up @@ -141,6 +152,14 @@
# VEKTRA_AUDIT_RETENTION_DAYS=90
# VEKTRA_EVAL_MODE=false

# Persist QueryTrace rows for every query (DEBT-011). When unset, defaults
# to true if vektra-analytics is configured, false otherwise.
# VEKTRA_ANALYTICS_STORE_TRACES=

# Log original and rewritten query text at debug level. Development only;
# query text is otherwise redacted from logs.
# VEKTRA_DEBUG_LOG_QUERIES=false

# --------------------------------------------------------------------------
# Security
# --------------------------------------------------------------------------
Expand Down Expand Up @@ -174,3 +193,10 @@
# Set to false when an external LMS (e.g. Moodle) manages enrollment.
# When false, namespace is derived from JWT (namespace claim or course_id fallback).
# VEKTRA_LEARN_REQUIRE_ENROLLMENT=true

# Default visibility of the source-citations section in the chatbot widget
# (FEAT-014). Resolution chain: data-show-sources attr (client) >
# namespaces.config.show_sources (per-course) > this env var > hardcoded true.
# The API always returns the full sources list; this flag only instructs the
# widget whether to render them.
# VEKTRA_LEARN_SHOW_SOURCES=true
2 changes: 1 addition & 1 deletion .gemini/styleguide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Vektra coding conventions for Gemini Code Assist
# Vektra RAG coding conventions for Gemini Code Assist

## General

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Report a bug in Vektra
description: Report a bug in Vektra RAG
labels: ["bug"]
body:
- type: markdown
Expand Down
248 changes: 234 additions & 14 deletions .s2s/BACKLOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .s2s/CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ See [architecture.md](architecture.md) for complete architecture documentation.
- ChunkingStrategy: pluggable chunking. FixedSizeChunking (Phase 1), DualStrategyChunking with semantic splitting (Phase 2)
- QueryPipeline: RAG pipeline abstraction returning QueryResponse + QueryTrace. Phase 2: AdvancedQueryPipeline with query rewriting (ARCH-061), reranking, hybrid search (implemented)
- SafeguardHook: pre/post query safeguards (3 trust boundary points) with content modification support (ARCH-049)
- EventEmitter: internal event hooks. NoOpEventEmitter (Phase 1), LogEventEmitter (Phase 2)
- EventEmitter: internal event hooks. NoOpEventEmitter (Phase 1), WebhookEventEmitter (Phase 2: HMAC-SHA256 signed HTTP POST)

**Key decisions** (64 total, 25 ADRs):
- [ADR-0003](decisions/ADR-0003-modular-monolith-phase1.md): Modular monolith for Phase 1
Expand Down
10 changes: 5 additions & 5 deletions .s2s/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ See [section 8.4](#84-deployment) for Docker Compose specification and resource
- **ARCH-035 - EmbeddingProvider Protocol**: Dedicated Protocol for embedding generation. Separates embed_documents() from embed_query() for asymmetric models. Single shared instance between ingest and core. Configurable provider and model via env vars.
- **ARCH-036 - QueryPipeline Protocol**: Abstraction of RAG query pipeline. execute() returns (QueryResponse, QueryTrace). Phase 1: SimpleQueryPipeline (embed -> search -> relevance_filter -> build_prompt -> LLM, with graceful degradation). relevance_filter applies minimum score threshold and overlap deduplication (ARCH-056). build_prompt calculates token budget from model context window (ARCH-055), renders composable Jinja2 templates (ARCH-054). Phase 2: AdvancedQueryPipeline adds query_rewrite (ARCH-061), query_classify, rerank, confidence scoring steps. Selectable via VEKTRA_QUERY_PIPELINE.
- **ARCH-037 - ChunkingStrategy Protocol**: Abstraction of text chunking. Receives DocumentChunk stream, returns chunked stream. Phase 1: FixedSizeChunking. Selectable via VEKTRA_CHUNKING_STRATEGY.
- **ARCH-038 - EventEmitter interface**: Internal event hooks with NoOp default. Emission points at document lifecycle, query completion, safeguard triggers, API key operations. Phase 2 (implemented): LogEventEmitter. WebhookEventEmitter with HMAC-SHA256 deferred to Phase 3.
- **ARCH-038 - EventEmitter interface**: Internal event hooks with NoOp default. Emission points at document lifecycle, query completion, safeguard triggers, API key operations. Phase 2 (implemented): WebhookEventEmitter (HMAC-SHA256 signed HTTP POST, activated via `VEKTRA_WEBHOOK_URL`). LogEventEmitter (structlog-based) was scoped during planning but never implemented; the webhook path subsumed the use case.
- **ARCH-039 - ProviderRegistry pattern**: Unified registry for all Protocol implementations. Dict-based in Phase 1, extensible to entry_points plugin discovery in Phase 2. Consistent VEKTRA_* env var configuration pattern.
- **ARCH-040 - Forward-compatible data model**: Phase 1 schema includes fields for Phase 2 features: response_id and citation_id for feedback loops, document version and supersedes_id for versioning, deleted_at and deletion_reason for soft delete, index_version for zero-downtime reindex. All fields nullable/defaulted, no behavioral change in Phase 1.
- **ARCH-041 - Audit/analytics separation**: QueryTrace (per-step timing, chunk refs, model info) emitted separately from audit log. QueryTrace does not contain query text or response content (REQ-051 compliance). Phase 1: structlog emission. Phase 2 (implemented): dedicated query_traces table with reporting API (vektra-analytics).
Expand Down Expand Up @@ -704,7 +704,7 @@ class EventEmitter(Protocol):
async def emit(event_type: str, payload: dict) -> None
```

Phase 1: NoOpEventEmitter. Emission points: document.indexed, document.failed, query.completed, safeguard.triggered, apikey.created, apikey.revoked. Phase 2 (implemented): LogEventEmitter (structlog-based event logging). WebhookEventEmitter with HMAC-SHA256 deferred to Phase 3.
Phase 1: NoOpEventEmitter. Emission points: document.indexed, document.failed, query.completed, safeguard.triggered, apikey.created, apikey.revoked. Phase 2 (implemented): WebhookEventEmitter — HMAC-SHA256 signed HTTP POST with configurable URL, secret, and timeout (`VEKTRA_WEBHOOK_URL`, `VEKTRA_WEBHOOK_SECRET`, `VEKTRA_WEBHOOK_TIMEOUT`). LogEventEmitter was originally scoped for Phase 2 but never built; structlog already emits the same events at module boundaries, so the webhook path was prioritized instead.

### 8.3.1 Extended types

Expand Down Expand Up @@ -1989,7 +1989,7 @@ Quality scenarios (QS-xx) define measurable targets. Validation scenarios ([vali
| TD-05 | No OAuth/OIDC | API keys sufficient for Phase 1 | Add for vektra-learn in Phase 2 |
| TD-06 | Confidence scoring undefined | Algorithm needs research spike, confidence_tier field exists in QueryResponse | OQ-014, Phase 2 spike, field ready (ARCH-040) |
| TD-07 | Dense-only vector search | Hybrid search Protocol ready (SearchMode enum), implementation deferred | REQ-050, swap PgvectorProvider or add QdrantVectorStoreProvider in Phase 2 (ARCH-051) |
| TD-08 | NoOp event emission | EventEmitter hooks in place, no handler | REQ-061, swap to WebhookEventEmitter in Phase 2 |
| TD-08 | NoOp event emission | EventEmitter hooks in place, no handler | REQ-061, WebhookEventEmitter implemented in Phase 2 |
| TD-09 | Passthrough safeguards | SafeguardHook hooks in place, no enforcement | REQ-044, swap to Presidio-based in Phase 2 |
| TD-10 | No sparse embeddings | SparseEmbeddingProvider Protocol defined, not registered | ARCH-053, register FastEmbedBM25Provider or SPLADEProvider in Phase 2 |

Expand Down Expand Up @@ -2133,7 +2133,7 @@ Quality scenarios (QS-xx) define measurable targets. Validation scenarios ([vali
| REQ-058 Content type detection | ARCH-042 Magic bytes | Reliable dispatch, mismatch warnings |
| REQ-059 LLM graceful degradation | ARCH-043 Graceful degradation, ARCH-056 Retrieval quality | Fallback model, context-only response, no-relevant-context path |
| REQ-060 QueryTrace | ARCH-041 Audit/analytics separation | Per-step RAG tracing, GDPR-safe |
| REQ-061 EventEmitter | ARCH-038 EventEmitter interface | NoOp Phase 1, LogEventEmitter Phase 2 |
| REQ-061 EventEmitter | ARCH-038 EventEmitter interface | NoOp Phase 1, WebhookEventEmitter Phase 2 |
| REQ-062 ProviderRegistry | ARCH-039 ProviderRegistry pattern | Unified provider configuration |
| REQ-063 Metadata filtering | ARCH-044 Chunk metadata filtering | JSONB + GIN index, SearchFilters in search() |
| REQ-064 Zero-downtime reindex | ARCH-045 Index version | Atomic version switch, no downtime |
Expand Down Expand Up @@ -2218,4 +2218,4 @@ Quality scenarios (QS-xx) define measurable targets. Validation scenarios ([vali
*Version 1.9 - Quality scenarios: Section 10 expanded from 12 to 18 QS entries, quality tree restructured, 6 architecture-derived scenarios added (ARCH-043 degradation, ARCH-057 startup, ARCH-039 extensibility, ARCH-040 evolvability, NFR-008 retention, NFR-010 progress), validation scenario cross-reference (10.4)*
*Version 1.9.1 - Conversational query rewriting: ARCH-061 (pre-retrieval query rewriting in AdvancedQueryPipeline), ADR-0023, rewrite.j2 template added to ARCH-054, ARCH-036 Phase 2 updated. Multilingual embedding note added to ADR-0013.*
*Version 1.10 - OQ-018/OQ-019 resolution: ARCH-062 (admin UI server-side rendering, ADR-0024), ARCH-063 (learn chatbot widget, ADR-0025), ARCH-064 (Phase 2 hardware target 8GB/4CPU). Glossary: HTMX added. Deferred table: 3 entries added.*
*Version 2.0 - Phase 2 delivery annotations: all Phase 2 features marked as implemented (v0.2.0). Component table expanded with vektra-analytics and vektra-learn. Protocol implementations updated: QdrantVectorStoreProvider, UnstructuredExtractor, DualStrategyChunking, AdvancedQueryPipeline, FastEmbedBM25Provider, LogEventEmitter. WebhookEventEmitter deferred to Phase 3.*
*Version 2.0 - Phase 2 delivery annotations: all Phase 2 features marked as implemented (v0.2.0). Component table expanded with vektra-analytics and vektra-learn. Protocol implementations updated: QdrantVectorStoreProvider, UnstructuredExtractor, DualStrategyChunking, AdvancedQueryPipeline, FastEmbedBM25Provider, WebhookEventEmitter. LogEventEmitter was originally scoped for Phase 2 but never built; the webhook path subsumed the use case.*
Loading
Loading