feat: Phase 3 — RAG-Anbindung fuer alle 18 Dokumenttypen + Vendor Contract Review
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

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>
This commit is contained in:
Benjamin Admin
2026-03-02 10:10:32 +01:00
parent d9f819e5be
commit cd15ab0932
9 changed files with 469 additions and 57 deletions

View File

@@ -211,9 +211,9 @@ export async function analyzeContract(
/**
* Transform LLM response to typed response
*/
function transformAnalysisResponse(
export function transformAnalysisResponse(
llmResponse: Record<string, unknown>,
request: ContractAnalysisRequest
request: Pick<ContractAnalysisRequest, 'contractId' | 'vendorId' | 'tenantId' | 'documentText'>
): ContractAnalysisResponse {
const findings: Finding[] = (llmResponse.findings as Array<Record<string, unknown>> || []).map((f, idx) => ({
id: `finding-${request.contractId}-${idx}`,