Gen AI Builder
==============

.. _gen-ai-builder-1:

Gen AI Builder
==============

Gen AI Builder provides comprehensive tooling for developing intelligent
applications that leverage organizational knowledge through
:ref:`retrieval‑augmented generation <AI Factory terminology>`  patterns. The platform operates within controlled
infrastructure environments, ensuring complete organizational
sovereignty over data, models, and inference operations.

New here? Start with :ref:`Gen AI Builder Hub <Gen AI Builder Hub>`  , review :ref:`Gen AI Builder Concepts (Assistants, Knowledge, Tools, Threads) <Gen AI Builder Concepts (Assistants, Knowledge, Tools, Threads)>`  and the
:ref:`Gen AI Architecture (Entities and Flows) <Gen AI Architecture (Entities and Flows)>`  , then use the :ref:`Gen AI How-To Guides <Gen AI How-To Guides>`  or jump into the
:ref:`Customer Service Assistant Implementation Guide <Customer Service Assistant Implementation Guide>`  .

Platform Architecture
---------------------

Gen AI Builder integrates multiple components to deliver end-to-end AI
application development capabilities within the EDB Postgres AI
ecosystem. The platform emphasizes data sovereignty by maintaining all
operations within organizational boundaries while providing
enterprise-grade governance and auditability. Explore the :ref:`Assistants Reference Manual <Assistants Reference Manual>` 
, :ref:`Knowledge Bases Reference Manual <Knowledge Bases Reference Manual>`  , :ref:`Retrievers Reference Manual <Retrievers Reference Manual>`  , :ref:`Rulesets Manual <Rulesets Manual>`  , :ref:`Structures Reference Manual <Structures Reference Manual>`  ,
:ref:`Tools Reference Manual <Tools Reference Manual>`  , :ref:`Threads Reference Manual <Threads Reference Manual>`  , :ref:`Configure Data Sources in Gen AI Builder <Configure Data Sources in Gen AI Builder>`  , :ref:`Data Lake Reference Manual <Data Lake Reference Manual>`  , and
:ref:`LibrariesΩ Manual <LibrariesΩ Manual>`  manuals.

Core Infrastructure Integration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

**Hybrid Manager Foundation** Gen AI Builder operates within
:ref:`EDB’s vision for AI with Postgres and Hybrid Manager <EDB’s vision for AI with Postgres and Hybrid Manager>`  ’s Kubernetes orchestration layer, leveraging distributed
computing capabilities while maintaining centralized governance. This
architecture ensures consistent operational procedures across
development and production environments.

**Data Estate Integration** :ref:`Knowledge Bases Reference Manual <Knowledge Bases Reference Manual>`  connect directly to Postgres
databases and object storage systems (see :ref:`Data Lake Reference Manual <Data Lake Reference Manual>`  ) within
organizational infrastructure, eliminating external data dependencies
while supporting diverse :ref:`Configure Data Sources in Gen AI Builder <Configure Data Sources in Gen AI Builder>`  types.

**Model Serving Integration** Applications access language models and
embedding models through the :ref:`AI Factory Models <AI Factory Models>`  infrastructure, ensuring
consistent governance policies across all AI capabilities.

Architectural Components
------------------------

Knowledge Base Framework
^^^^^^^^^^^^^^^^^^^^^^^^

:ref:`Knowledge Bases Reference Manual <Knowledge Bases Reference Manual>`  serve as the foundation for retrieval‑augmented
generation applications by combining structured database content with
unstructured document repositories. The framework provides semantic
search capabilities through vector embeddings (see :ref:`Vector Engine (PGvector) <Vector Engine (PGvector)>`  )
while maintaining complete data lineage.

**Data Source Integration**

- Postgres database tables with semantic indexing

- Document repositories from object storage systems

- Real-time data feeds through API integrations

- Web content through controlled scraping operations

**Embedding Management**

- Private embedding models for sensitive content processing

- Vector storage optimization within Postgres infrastructure

- Semantic similarity algorithms for retrieval accuracy

- Hybrid search combining vector and keyword approaches

Retrieval Systems
^^^^^^^^^^^^^^^^^

:ref:`Retrievers Reference Manual <Retrievers Reference Manual>`  components orchestrate search operations across diverse
data sources, providing unified interfaces for knowledge discovery while
maintaining source attribution and access controls.

**Retrieval Strategies**

- Vector similarity search for semantic content matching

- Keyword-based search for exact term identification

- Hybrid approaches combining multiple retrieval methods

- Contextual filtering based on user permissions and data classification

Assistant Framework
^^^^^^^^^^^^^^^^^^^

Intelligent :ref:`Assistants Reference Manual <Assistants Reference Manual>`  combine knowledge retrieval with language
model capabilities to provide conversational interfaces for
organizational knowledge. The framework supports complex reasoning
workflows while maintaining audit trails for all interactions (see
:ref:`Threads Reference Manual <Threads Reference Manual>`  ).

**Assistant Capabilities**

- Multi-turn conversational interfaces with context preservation

- :ref:`Tools Reference Manual <Tools Reference Manual>`  integration for external system interactions

- Reasoning workflows for complex query resolution

- Audit logging for compliance and operational transparency

Implementation Patterns
-----------------------

Enterprise Knowledge Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Organizations implement comprehensive knowledge management systems that
unify structured and unstructured information sources through semantic
search capabilities.

**Typical Architecture**

1. **Data Integration Layer**: Connects multiple organizational
   :ref:`Configure Data Sources in Gen AI Builder <Configure Data Sources in Gen AI Builder>`  including databases, document repositories, and
   knowledge management systems

2. **Processing Pipeline**: Transforms content into searchable formats
   with appropriate metadata and access control annotations

3. **Retrieval Interface**: Provides unified search across all
   integrated content with relevance ranking and source attribution

4. **Application Layer**: Delivers knowledge access through
   conversational interfaces and API integrations

**Implementation Considerations**

- Data governance policies for content classification and access control

- Performance optimization for large document collections

- Integration with existing authentication and authorization systems

- Compliance requirements for audit trails and data lineage

Retrieval-Augmented Generation Applications
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Applications combine retrieval capabilities with language model
inference to provide context-aware responses based on organizational
knowledge.

**Development Workflow**

1. **Knowledge Base Construction**: Establish comprehensive document
   indexing with semantic embeddings (see :ref:`Create a Knowledge Base in Gen AI Builder <Create a Knowledge Base in Gen AI Builder>`  and
   :ref:`Manage Knowledge Bases in Gen AI Builder <Manage Knowledge Bases in Gen AI Builder>`  )

2. **Retrieval Configuration**: Implement search strategies optimized
   for application requirements

3. **Generation Integration**: Connect language models for response
   generation based on retrieved context

4. **Response Orchestration**: Coordinate retrieval and generation
   workflows with appropriate caching and optimization

**Technical Requirements**

- Low-latency retrieval for interactive applications

- Context window management for large document processing

- Response quality evaluation and improvement workflows

- Integration testing across knowledge base updates

Conversational AI Platforms
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Interactive applications provide natural language interfaces for complex
organizational workflows and information discovery.

**Platform Components**

- Multi-modal input processing for text, voice, and document
  interactions

- Context management for extended conversational sessions

- Tool integration for external system operations

- Response personalization based on user roles and preferences

**Operational Features**

- Session management with conversation state persistence

- Performance monitoring for response quality and latency

- Usage analytics for application optimization and capacity planning

- Security controls for sensitive information handling

Development Framework
---------------------

Knowledge Base Development
^^^^^^^^^^^^^^^^^^^^^^^^^^

Knowledge base creation involves data source integration, content
processing, and semantic indexing to support efficient retrieval
operations.

**Development Process**

1. **Source Assessment**: Evaluate :ref:`Configure Data Sources in Gen AI Builder <Configure Data Sources in Gen AI Builder>`  for content quality,
   update frequency, and access requirements

2. **Processing Pipeline Design**: Configure content transformation
   workflows including cleaning, chunking, and metadata extraction (see
   :ref:`Configure the Data Lake in Gen AI Builder <Configure the Data Lake in Gen AI Builder>`  )

3. **Indexing Strategy**: Implement embedding generation and vector
   storage optimization

4. **Retrieval Testing**: Validate search quality through systematic
   evaluation procedures

**Quality Assurance**

- Content accuracy verification through systematic sampling

- Retrieval relevance evaluation using standard metrics

- Performance benchmarking under expected load conditions

- Security testing for access control and data isolation

Assistant Configuration
^^^^^^^^^^^^^^^^^^^^^^^

Assistant development requires careful orchestration of retrieval,
reasoning, and response generation capabilities to deliver reliable user
experiences (see :ref:`Create an Assistant in Gen AI Builder <Create an Assistant in Gen AI Builder>`  ).

**Configuration Areas**

- **Behavior Definition**: Establish assistant personality,
  capabilities, and operational boundaries

- **Knowledge Integration**: Configure retrieval strategies and
  knowledge source prioritization (see :ref:`Retrievers Reference Manual <Retrievers Reference Manual>`  )

- **Tool Integration**: Connect external systems and APIs for expanded
  functionality (see :ref:`Tools Reference Manual <Tools Reference Manual>`  )

- **Response Optimization**: Tune generation parameters for appropriate
  response characteristics

**Testing Strategies**

- Conversational flow validation through systematic dialog testing

- Knowledge accuracy verification across diverse query types

- Integration testing for external tool interactions

- Load testing for concurrent user scenarios

API Development
^^^^^^^^^^^^^^^

Applications expose functionality through standardized APIs that support
diverse client applications while maintaining consistent security and
operational characteristics (see :ref:`Where to find SDK references and examples? <Where to find SDK references and examples?>`  ).

**API Design Principles**

- RESTful interfaces with clear resource modeling

- Authentication and authorization integration with organizational
  systems

- Rate limiting and quota management for resource protection

- Comprehensive documentation and SDK support

Integration Architecture
------------------------

EDB Postgres AI Ecosystem
^^^^^^^^^^^^^^^^^^^^^^^^^

Gen AI Builder integrates seamlessly with other EDB Postgres AI
components to provide comprehensive AI application development
capabilities.

**Component Interactions**

- \*\* :ref:`AI Factory Models <AI Factory Models>`  \*\*: Governed access to language models and
  embedding models

- \*\* :ref:`AI Accelerator Pipelines <AI Accelerator Pipelines>`  \*\*: Automated content processing and knowledge
  base updates

- \*\* :ref:`Vector Engine (PGvector) <Vector Engine (PGvector)>`  \*\*: High‑performance semantic search within
  Postgres infrastructure

- \*\* :ref:`EDB’s vision for AI with Postgres and Hybrid Manager <EDB’s vision for AI with Postgres and Hybrid Manager>`  \*\*: Orchestration and resource management

External System Integration
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Applications connect with existing organizational systems through
standardized interfaces while maintaining security boundaries and audit
capabilities.

**Integration Patterns**

- API-based connections for real-time data access

- Batch processing for large data source synchronization

- Event-driven updates for dynamic content management

- Secure authentication delegation for user access control

Operational Considerations
--------------------------

Performance Characteristics
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Gen AI Builder applications require careful performance optimization to
deliver responsive user experiences while managing computational
resources efficiently.

**Performance Factors**

- Knowledge base size affects retrieval latency and resource
  requirements

- Model complexity influences response generation time and GPU
  utilization

- Concurrent user load impacts system scalability and resource
  allocation

- Network connectivity affects distributed component communication

Security Framework
^^^^^^^^^^^^^^^^^^

Comprehensive security controls protect sensitive organizational
knowledge while enabling appropriate access for authorized users and
applications.

**Security Components**

- Multi-tenant isolation for different organizational units

- Role-based access control aligned with existing authorization systems

- Data encryption for knowledge base content and communication channels

- Audit logging for all knowledge access and assistant interactions

Governance Integration
^^^^^^^^^^^^^^^^^^^^^^

Built-in governance capabilities ensure applications comply with
organizational policies and regulatory requirements throughout their
operational lifecycle.

**Governance Features**

- Content approval workflows for knowledge base updates

- Model usage tracking and compliance reporting

- Data lineage maintenance for audit and troubleshooting

- Performance monitoring aligned with service level objectives

Getting Started
---------------

Prerequisites
^^^^^^^^^^^^^

Gen AI Builder requires foundational infrastructure components including
Hybrid Manager installation and appropriate compute resources for AI
workloads.

**Infrastructure Requirements**

- Kubernetes cluster with sufficient compute and storage capacity

- GPU resources for model serving and embedding generation

- Network connectivity to organizational data sources

- Integration with identity and access management systems

Initial Implementation
^^^^^^^^^^^^^^^^^^^^^^

Organizations should begin with focused use cases that demonstrate value
while establishing operational procedures for broader deployment.

**Implementation Sequence**

1. **Pilot Knowledge Base**: Create initial knowledge base with
   well-defined content scope

2. **Basic Retrieval**: Implement simple search functionality with
   performance validation

3. **Assistant Prototype**: Develop conversational interface for pilot
   knowledge domain

4. **Production Deployment**: Scale successful prototypes with
   comprehensive operational controls

Learning Resources
^^^^^^^^^^^^^^^^^^

**Conceptual Foundation**

- :ref:`Gen AI Builder Hub <Gen AI Builder Hub>`  - Platform overview and initial setup procedures

- :ref:`Gen AI How-To Guides <Gen AI How-To Guides>`  - Practical implementation guidance for common
  scenarios

**Component Documentation**

- :ref:`LibrariesΩ Manual <LibrariesΩ Manual>`  - Comprehensive knowledge base development guidance

- :ref:`Assistants Reference Manual <Assistants Reference Manual>`  - Intelligent assistant creation and configuration

- :ref:`API Reference <reference>`  - Detailed technical documentation for development
  teams

**Advanced Topics**

- :ref:`Data Lake Reference Manual <Data Lake Reference Manual>`  - Large-scale data processing and management

- :ref:`SDK Documentation <reference>`  - Programmatic interfaces for custom development

--------------

Gen AI Builder enables organizations to develop sophisticated AI
applications while maintaining complete control over data, models, and
inference operations within their existing infrastructure environments.

.. toctree::
  :maxdepth: 3

  Usage--gen-ai--Getting_Started--index
  Usage--gen-ai--Manual--index
  Usage--gen-ai--Explainers--index
  Usage--gen-ai--How_to_prepare_data_and_kb--index
  Usage--gen-ai--How_to_bulid_assistants--index
  Usage--gen-ai--How_to_integrate_with_your_apps--index
  Usage--gen-ai--How_to_operate_and_observe--index
