Skip to content

Auto-produce RetrievalAugmentor bridging Camel ingestion with @RegisterAiService RAG #8966

Description

@JiriOndrusek

When Camel routes ingest documents into an EmbeddingStore (via langchain4j-embeddingstore component), the retrieved knowledge should be available to Quarkus LangChain4j @RegisterAiService for RAG-augmented chat. This adds auto-production of RetrievalAugmentor CDI beans that bridge the two, so they share the same EmbeddingStore instance without explicit user wiring.

Covered scenarios

  • Single store + model, no existing RAG: auto-produce a defaultBean() RetrievalAugmentor backed by the @Default store (zero config)
  • Single store + model, existing RAG (Easy RAG or user-provided): defaultBean() yields, no conflict
  • Multiple stores, no config: auto-produce a default RAG backed by the @Default store
  • Multiple stores with config: named RetrievalAugmentor beans via quarkus.camel.langchain4j.rag.augmentors.<name>.embedding-store-name

New files

  • RagBridgeConfig@ConfigRoot(BUILD_AND_RUN_TIME_FIXED) for named augmentor config
  • DefaultRetrievalAugmentorSupplier — lazily resolves EmbeddingStore + EmbeddingModel from CDI
  • Build steps in SupportQuarkusLangchain4jProcessor
  • Integration test module langchain4j-rag-bridge-ql4j

Related

  • Benefits from (but does not require) CAMEL-24366 which adds auto-embed to the embeddingstore component

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions