Ragfish Logo
Get In Touch
Ragfish Logo

Book a Demo

Assistant

An Assistant represents an AI assistant built with the Ragfish Framework.

An assistant brings together the components required to create a focused AI experience, including its instructions, knowledge, retrieval configuration, language model, and conversation capabilities.

The Assistant abstraction is designed to provide a higher-level building block for applications built on Ragfish.

    1. Customer Support Assistant

    2. HR Assistant

    3. Compliance Assistant

    4. Product Documentation Assistant

    5. Internal Knowledge Assistant

For example:

Instead of building each AI interaction independently, you can define an assistant around a specific purpose or domain.

What Is an Assistant?

An assistant is a configured AI application that combines the capabilities of the Ragfish Framework.

Conceptually:

Application
     │
     ▼
 Assistant
     │
 ┌───┼─────────────┐
 ▼   ▼             ▼
Chat Knowledge  Configuration
     │
     ▼
 Retriever
     │
     ▼
Vector Store
     │
     ▼
    LLM

The exact components used by an assistant depend on the application requirements.

Why Use Assistants?

Without an assistant abstraction, an application may need to manage AI configuration, retrieval, prompts, and conversations independently for every use case.

With Ragfish, these concepts can be organized around an assistant.

For example, an enterprise application might provide:

Enterprise AI Application
        │
        ├── HR Assistant
        │
        ├── Compliance Assistant
        │
        ├── Customer Support Assistant
        │
        └── Product Assistant

Each assistant can represent a different domain while using the same underlying Ragfish framework.

Assistant Configuration

An assistant can be defined using configuration appropriate for its purpose.

For example:

const assistant = new Assistant({
  name: "FoodTraze Compliance",
  documents: [
    "eudr.pdf",
    "fsma204.pdf"
  ],
  llm: "gpt-4o",
  access: "private"
});

This example represents an assistant focused on compliance knowledge.

Assistant and Knowledge

An assistant can be associated with a specific knowledge domain.

For example:

FoodTraze Compliance Assistant
        │
        ├── EUDR Documentation
        ├── FSMA 204 Documentation
        └── Compliance Guidelines


When a user asks a question, the assistant can use its configured knowledge and retrieval system to identify relevant information before generating a response.

This allows different assistants to operate over different knowledge spaces.

Assistant and Chat

Chat is responsible for handling the conversational interaction

An assistant provides the higher-level application context around that conversation.

Conceptually:

Assistant
    │
    ▼
  Chat
    │
    ▼
Retriever
    │
    ▼
Knowledge

This separation allows the chat mechanism to remain reusable while the assistant defines the application-specific context.

Assistant and Retrieval

An assistant can use a retriever to access relevant knowledge.

For example:

User Question
      │
      ▼
  Assistant
      │
      ▼
     Chat
      │
      ▼
  Retriever
      │
      ▼
 Vector Store
      │
      ▼
Relevant Knowledge
      │
      ▼
  AI Response

The retriever is responsible for finding relevant information, while the assistant provides the context in which that information is used.

Multiple Assistants

A single Ragfish application can contain multiple assistants.

For example:

My AI Application
│
├── HR Assistant
│   └── HR Knowledge
│
├── Support Assistant
│   └── Product Knowledge
│
├── Compliance Assistant
│   └── Regulatory Documents
│
└── Sales Assistant
    └── Product & Sales Knowledge

This allows one application to provide specialized AI experiences without creating a separate framework implementation for each use case.

Private and Public Assistants

Assistants can also be designed around different access requirements.

For example:


const assistant = new Assistant({ name: "FoodTraze Compliance", access: "private" }); const assistant = new Assistant({ name: "FoodTraze Compliance", access: "private" });

Access control can become particularly important in enterprise applications where knowledge may contain internal or confidential information.

Assistant as an Application Abstraction

The Assistant abstraction allows Ragfish to move beyond a simple chat interface.

A basic RAG application can be thought of as:

Question
   ↓
Retriever
   ↓
LLM
   ↓
Answer

An assistant-oriented application can be organized as:

Assistant
   │
   ├── Instructions
   ├── Knowledge
   ├── Retrieval
   ├── Chat
   ├── Model
   └── Access

This provides a foundation for building richer enterprise AI applications as the framework evolves.

Assistant Lifecycle

A typical assistant lifecycle can be represented as:

Create Assistant
       │
       ▼
Configure Assistant
       │
       ▼
Attach Knowledge
       │
       ▼
Configure Retrieval
       │
       ▼
Start Conversation
       │
       ▼
Process Questions
       │
       ▼
Generate Responses

The exact lifecycle depends on how the assistant is integrated into the application.

Designing Focused Assistants

A good assistant should have a clear purpose.

For example, instead of creating one assistant that tries to answer every question:

General Enterprise Assistant

you can create specialized assistants:

HR Assistant

Product Assistant

Customer Support Assistant

Compliance Assistant

Each assistant can have its own knowledge, instructions, retrieval configuration, and access requirements.

This makes the application easier to manage and allows each assistant to be optimized for its intended use case.

Best Practices

When designing assistants:

    1. Give each assistant a clear purpose.

    2. Keep knowledge relevant to the assistant's domain.

    3. Use appropriate retrieval strategies.

    4. Keep sensitive knowledge restricted to authorized users.

    5. Separate assistant configuration from application business logic.

    6. Reuse framework components instead of duplicating implementation.

    7. Keep provider-specific configuration modular.

What's Next?

Now that you understand the Assistant abstraction, the next page covers Chat.