UChat Official

Introduction

This guide explores a robust method to build your own ChatGPT intent system, serving as a replacement for traditional OpenAI embeddings.

The approach leverages multiple chat completions, each dedicated to specific topics, and a main chat completion that orchestrates the flow based on user input.

This system enables handling hundreds of questions about your business without relying on embeddings, reducing token usage, and enhancing response accuracy.

How the ChatGPT Intent System Works

Core Concept

The system is designed around multiple specialized chat completions, each representing a distinct topic or category within your business. These are orchestrated by a main chat completion that:

  • Receives user input

  • Identifies the relevant topic

  • Triggers the appropriate response node

This architecture mimics traditional embedding matching but entirely within ChatGPT's capabilities, eliminating the need for external embedding models.

Key Components

Component

Description

Functionality

Main Chat Completion

Central hub

Processes user questions, determines topic, returns a specific NS ID (Node ID)

Topic-specific Chat Completions

Specialized nodes

Contain predefined responses or information about specific topics

System Messages

Instructions

Guide ChatGPT on how to respond within each node, including guidelines and context

Action Nodes

Control flow

Use "go to node" actions to navigate between chat completions based on NS ID

How It Works Step-by-Step

  1. User Input: The user asks a question, e.g., "Do you offer coaching?"

  2. Main Chat Completion: Processes the question with a system message that contains topic-specific triggers.

  3. Topic Identification: Based on the input, the main completion returns a specific NS ID (e.g., membership_info).

  4. Node Triggering: The system uses a "go to node" action with the NS ID to navigate to the relevant chat completion.

  5. Response Delivery: The targeted chat completion responds with detailed, topic-specific information.

How to Implement the System

Step 1: Define Topics and Responses

Create separate chat completions for each topic, such as:

  • Membership details

  • Templates

  • Stock information

  • Tutorials

  • Product FAQs

Each chat completion contains:

  • System messages with guidelines and context about the topic

  • Predefined responses or links

Step 2: Configure the Main Chat Completion

The main chat completion should include:

  • A system message that recognizes topics based on user input

  • Logic to return a specific NS ID depending on the detected topic

Example:

If the user asks about membership, return NS ID: membership_info
If the user asks about templates, return NS ID: templates_info
If the user mentions stock or frozen, return NS ID: stock_info

Step 3: Map NS IDs to Nodes

Use conditional logic to map NS IDs to specific chat completions:

NS ID

Corresponding Node

Purpose

membership_info

Membership chat completion

Details about membership plans, benefits

templates_info

Templates chat completion

Access to templates and resources

stock_info

Stock chat completion

Stock status, updates

tutorials

Tutorials chat completion

Educational content

Step 4: Use "Go to Node" Actions

Implement "go to node" actions within your system to navigate to the appropriate chat completion based on the NS ID returned.

Example:

If NS ID = membership_info, go to node: MembershipDetails
If NS ID = templates_info, go to node: TemplatesDetails

Step 5: Optimize Token Usage

By dividing information into smaller, topic-specific chat completions, you reduce token consumption and improve response relevance. This modular approach ensures:

  • Faster responses

  • Lower costs

  • Better scalability

Example Workflow

User Question

Main Chat Completion Response

Action

Next Node

Final Response

"Do you do coaching?"

Returns NS ID: membership_info

Go to node

Membership Details

"Our membership includes..."

"Show me templates"

Returns NS ID: templates_info

Go to node

Templates Resources

"Here are the templates..."

"Is Chipotle stock frozen?"

Returns NS ID: stock_info

Go to node

Stock Info

"Chipotle stock is currently..."

Handling Limitations and Challenges

Model Dependency

  • GPT-4 offers more precise NS ID extraction.

  • GPT-3.5 Turbo may sometimes return entire sentences instead of just NS IDs, which can cause fidelity issues.

Common Issues

  • Inconsistent NS ID extraction with GPT-3.5 Turbo

  • Potential for full sentence responses instead of clean NS IDs

  • Guidelines within system messages should strictly instruct the model to return only the NS ID enclosed in quotes

Solutions

  • Use explicit instructions in system messages:

Return only the NS ID enclosed in quotation marks. Do not include any additional text
  • Test thoroughly to ensure consistent behavior

  • Consider upgrading to GPT-4 for more reliable performance

Practical Applications and Examples

Business Use Cases

  • Customer Support: Handle FAQs about products, services, or policies

  • Educational Content: Provide tutorials, guides, or links based on user queries

  • E-commerce: Answer questions about stock, shipping, or discounts

  • Membership Management: Share details about plans, benefits, or renewal processes

Example: YouTube Channel Chatbot

  • Topic: Video tutorials and links

  • Implementation:

    • When asked, "How to create images?", the system responds with a link.

    • When asked, "Which model is better, GPT-3 or GPT-4?", it provides a relevant resource link.

This modular setup streamlines user interactions and delivers targeted responses efficiently.

Final Thoughts: Advantages and Downsides

Advantages

  • No need for embeddings: Fully relies on ChatGPT's capabilities

  • Scalable: Handles hundreds of questions without external models

  • Token efficiency: Smaller, topic-specific chat completions reduce token costs

  • Customizable: Easily add or modify topics and responses

  • Flow control: Precise navigation via NS IDs and "go to node" actions

Downsides

  • Model dependency: Less reliable with GPT-3.5 Turbo, more consistent with GPT-4

  • Response variability: Sometimes full sentences are returned instead of NS IDs

  • Complex setup: Requires careful configuration of system messages and node mappings

  • Limited by model capabilities: The system's effectiveness hinges on the model's ability to accurately identify NS IDs

Summary

Building your own ChatGPT intent system offers a powerful alternative to traditional embedding-based matching, providing greater flexibility, cost efficiency, and customization.

By dividing your business knowledge into dedicated chat completions and orchestrating responses through NS IDs and control nodes, you can create a robust, scalable chatbot capable of handling hundreds of queries with precision.

While there are some limitations, especially with models like GPT-3.5 Turbo, the benefits of this approach make it a compelling choice for businesses seeking dynamic, context-aware AI interactions.