[ 
https://issues.apache.org/jira/browse/CAMEL-21540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated CAMEL-21540:
------------------------------------
    Description: 
New camel-pgvector component for vector similarity search using the PostgreSQL 
pgvector extension. Provides a lightweight, SQL-native vector database option — 
no separate infrastructure needed beyond PostgreSQL.

Example route (YAML DSL):
{code:yaml}
- route:
    from:
      uri: direct:index
    steps:
      - setVariable:
          name: text
          simple: "${body}"
      - to:
          uri: openai:embeddings
          parameters:
            embeddingModel: nomic-embed-text
      - setHeader:
          name: CamelPgVectorAction
          constant: UPSERT
      - setHeader:
          name: CamelPgVectorTextContent
          simple: "${variable.text}"
      - to: pgvector:documents
{code}

Features:
* Actions: CREATE_TABLE, CREATE_INDEX (HNSW), DROP_TABLE, UPSERT, DELETE, 
SIMILARITY_SEARCH
* Distance types: cosine (default), euclidean, inner product
* SQL WHERE clause filtering on text_content and metadata columns
* UUID auto-generation when no record ID is provided
* Upsert with ON CONFLICT DO UPDATE for idempotent writes
* Data type transformers: pgvector:embeddings and pgvector:rag for LangChain4j 
integration
* OpenAI integration: direct chaining from openai:embeddings to pgvector
* Cross-documentation with camel-openai and camel-langchain4j-embeddings

  was:
Implement Vector search capabilities for PostgreSQL.

Also  add the langchain4j Embeddings DataFormat for PostgreSQL + an Integration 
test in the langchain4j embeddings directory 
[https://github.com/apache/camel/tree/main/components/camel-ai/camel-langchain4j-embeddings/src/test/java/org/apache/camel/component/langchain4j/embeddings]


> Vector Database capabilities - PostgreSQL
> -----------------------------------------
>
>                 Key: CAMEL-21540
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21540
>             Project: Camel
>          Issue Type: New Feature
>            Reporter: Zineb Bendhiba
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> New camel-pgvector component for vector similarity search using the 
> PostgreSQL pgvector extension. Provides a lightweight, SQL-native vector 
> database option — no separate infrastructure needed beyond PostgreSQL.
> Example route (YAML DSL):
> {code:yaml}
> - route:
>     from:
>       uri: direct:index
>     steps:
>       - setVariable:
>           name: text
>           simple: "${body}"
>       - to:
>           uri: openai:embeddings
>           parameters:
>             embeddingModel: nomic-embed-text
>       - setHeader:
>           name: CamelPgVectorAction
>           constant: UPSERT
>       - setHeader:
>           name: CamelPgVectorTextContent
>           simple: "${variable.text}"
>       - to: pgvector:documents
> {code}
> Features:
> * Actions: CREATE_TABLE, CREATE_INDEX (HNSW), DROP_TABLE, UPSERT, DELETE, 
> SIMILARITY_SEARCH
> * Distance types: cosine (default), euclidean, inner product
> * SQL WHERE clause filtering on text_content and metadata columns
> * UUID auto-generation when no record ID is provided
> * Upsert with ON CONFLICT DO UPDATE for idempotent writes
> * Data type transformers: pgvector:embeddings and pgvector:rag for 
> LangChain4j integration
> * OpenAI integration: direct chaining from openai:embeddings to pgvector
> * Cross-documentation with camel-openai and camel-langchain4j-embeddings



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to