Skip to main content

okustera_ai_rag_collection (Resource)

The okustera_ai_rag_collection resource provisions and manages vector knowledge collections for Retrieval-Augmented Generation (RAG) pipelines in Okustera. Collections index semantic text embeddings directly inside managed Qdrant vector databases, enabling high-recall context augmentation for LLM prompt completions.

Example Usage​

Enterprise Documentation RAG Knowledge Base​

resource "okustera_ai_rag_collection" "docs_kb" {
name = "company-policies"
embedding_model = "bge-large-en-v1.5"
vector_dimension = 1024
distance_metric = "Cosine"
description = "Internal company handbook, IT runbooks, and compliance policies"
}

High-Dimensional OpenAI Compatible Collection​

resource "okustera_ai_rag_collection" "support_kb" {
name = "customer-support-archive"
embedding_model = "text-embedding-3-small"
vector_dimension = 1536
distance_metric = "Cosine"
description = "Customer support tickets and resolution runbooks"
}

Schema​

Required​

  • name (String) Unique name of the RAG knowledge collection.
  • embedding_model (String) Identifier of the embedding model generating vector representations (e.g., bge-large-en-v1.5, text-embedding-3-small).
  • vector_dimension (Number) Embedding dimensionality (e.g., 1024 for BGE-Large, 1536 for OpenAI).

Optional​

  • distance_metric (String) Vector similarity metric used by the index: Cosine, Euclid, or Dot. Defaults to Cosine.
  • description (String) Detailed description of documents or domain context indexed.

Read-Only Attributes​

  • id (String) Unique collection identifier.
  • document_count (Number) Count of documents currently indexed into vector chunks.
  • status (String) Index readiness status (Ready, Indexing, Failed).

Import​

Existing RAG collections can be imported by their collection name:

terraform import okustera_ai_rag_collection.docs_kb company-policies