10000 Custom Model Prompting optimization · Issue #71 · Zain-ul-din/whatsapp-ai-bot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Custom Model Prompting optimization  #71
Closed
@Zain-ul-din

Description

@Zain-ul-din

Introduction

Since the custom model throws user instructions directly to the AI model. There are two main approaches to sending these instructions,

  1. System object: This approach works by sending instructions to the system object which costs fewer tokens but as the context grows it becomes hard for the AI model to remember all the instructions.

  2. Few Shot: To achieve more accurate results we are sending user instructions with each message which gives us a lot more accuracy but also costs more tokens since we are sending instructions every time.

Default Behavior

By default, we are using system object approach with each custom model. In case, a user wants to enable few shot approach, the user has to explicitly enable this feature by passing dangerouslyAllowFewShotApproach flag like so:

[  
 { ...customModelConfig, dangerouslyAllowFewShotApproach: true }
]

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0