Skip to main content
Set up and configure an automated system for generating and managing embeddings for a specific table in your database. This function creates the necessary infrastructure (tables, views, triggers, columns) and configures the embedding generation process. You use this function to:
  • Automate the process of creating embeddings for table data
  • Set up necessary infrastructure (tables, views, triggers, columns)
  • Configure the embedding generation process
  • Integrate with AI providers for embedding creation
  • Set up scheduling for background processing

Samples

Table destination (default)

Create a separate table to store embeddings with a view that joins with the source table:
This creates:
  1. A vectorizer named ‘website_blog_vectorizer’ for the website.blog table
  2. A separate table website.blog_embeddings_store to store embeddings
  3. A view website.blog_embeddings joining source and embeddings
  4. Loads the contents column
  5. Uses Ollama nomic-embed-text model to create 768 dimensional embeddings
  6. Chunks content into 128-character pieces with 10-character overlap
  7. Formats each chunk with title and published date
  8. Grants necessary permissions to roles bob and alice

Column destination

Store embeddings directly in the source table (requires no chunking):
This creates:
  1. A vectorizer named ‘product_descriptions_vectorizer’
  2. A column description_embedding directly in the source table
  3. Loads the description column
  4. No chunking (required for column destination)
  5. Uses OpenAI’s embedding model to create 768 dimensional embeddings
  6. Grants necessary permissions to role marketing_team

Arguments

Returns

INT: The ID of the vectorizer created. You can also reference the vectorizer by its name in management functions.