Skip to the content.

Data Models

This document provides an overview of the data models used in the Four-Sided Triangle RAG (Retrieval-Augmented Generation) system.

Base Model

The system uses a common BaseModel class that all other models inherit from, providing:

Document Model

Documents are the primary source of information in the system.

Key Components:

Query Model

Queries represent user questions or instructions.

Key Components:

Response Model

Responses are generated answers to user queries.

Key Components:

Embedding Model

Embeddings are vector representations of documents and queries.

Key Components:

Domain Knowledge Model

Domain knowledge represents specialized information about specific domains.

Key Components:

Working Memory Model

Working memory represents the system’s short-term memory during query processing.

Key Components:

Relationships

Data Flow

  1. Documents are ingested, processed, and embedded
  2. User submits a query
  3. System classifies query intent and extracts parameters
  4. Relevant documents are retrieved using embeddings
  5. Working memory tracks the processing state
  6. Domain knowledge enhances understanding when applicable
  7. Response is generated with appropriate citations and explanations