Files
breakpilot-compliance/admin-compliance/lib/sdk/drafting-engine/rag-config.ts
Benjamin Admin cd15ab0932
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 34s
CI / test-python-backend-compliance (push) Successful in 26s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 17s
feat: Phase 3 — RAG-Anbindung fuer alle 18 Dokumenttypen + Vendor Contract Review
Migrate queryRAG from klausur-service GET to bp-core-rag-service POST with
multi-collection support. Each of the 18 ScopeDocumentType now gets a
type-specific RAG collection and optimized search query instead of the
generic fallback. Vendor-compliance contract review now uses LLM + RAG
for real analysis with mock fallback on error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 10:10:32 +01:00

91 lines
2.5 KiB
TypeScript

/**
* RAG Configuration per Document Type
*
* Maps each ScopeDocumentType to its optimal RAG collection and search query.
* Used by the Drafting Engine to fetch type-specific legal context.
*/
import type { ScopeDocumentType } from '@/lib/sdk/compliance-scope-types'
export interface DocumentRAGConfig {
/** RAG collection name in bp-core-rag-service */
collection: string
/** Optimized search query for this document type */
query: string
}
export const DOCUMENT_RAG_CONFIG: Record<ScopeDocumentType, DocumentRAGConfig> = {
dsfa: {
collection: 'bp_dsfa_corpus',
query: 'Art. 35 DSGVO Risikobewertung Massnahmen',
},
tom: {
collection: 'bp_compliance_datenschutz',
query: 'Art. 32 DSGVO Sicherheit Verarbeitung',
},
vvt: {
collection: 'bp_compliance_gesetze',
query: 'Art. 30 DSGVO Dokumentationspflicht',
},
lf: {
collection: 'bp_compliance_recht',
query: 'Aufbewahrungsfristen Loeschkonzept',
},
dsi: {
collection: 'bp_compliance_datenschutz',
query: 'Art. 13 Art. 14 DSGVO Transparenz',
},
betroffenenrechte: {
collection: 'bp_compliance_recht',
query: 'Art. 15 bis 22 DSGVO Auskunft Loeschung',
},
datenpannen: {
collection: 'bp_compliance_recht',
query: 'Art. 33 Art. 34 DSGVO Meldepflicht',
},
daten_transfer: {
collection: 'bp_compliance_ce',
query: 'Kapitel V DSGVO Standardvertragsklauseln',
},
einwilligung: {
collection: 'bp_compliance_datenschutz',
query: 'Art. 6 Art. 7 Art. 9 DSGVO Widerruf',
},
vertragsmanagement: {
collection: 'bp_compliance_recht',
query: 'AVV Art. 28 DSGVO Vertragsanforderungen',
},
schulung: {
collection: 'bp_compliance_datenschutz',
query: 'Datenschutz Schulung Awareness',
},
audit_log: {
collection: 'bp_compliance_datenschutz',
query: 'Audit Logging Art. 5 Abs. 2 DSGVO',
},
risikoanalyse: {
collection: 'bp_compliance_ce',
query: 'Risikoanalyse Risikobewertung Framework',
},
notfallplan: {
collection: 'bp_compliance_recht',
query: 'Notfallplan Incident Response Krisenmanagement',
},
zertifizierung: {
collection: 'bp_compliance_ce',
query: 'ISO 27001 ISO 27701 Art. 42 DSGVO',
},
datenschutzmanagement: {
collection: 'bp_compliance_datenschutz',
query: 'DSMS PDCA Organisation',
},
iace_ce_assessment: {
collection: 'bp_compliance_ce',
query: 'AI Act KI-Verordnung CE-Konformitaet',
},
av_vertrag: {
collection: 'bp_compliance_recht',
query: 'AVV Art. 28 DSGVO Mindestinhalte',
},
}