Enhanced Messaging Types Support
Background:
Our current product lacks the support for System Messages in ChatGPT/Llama2 and requires a custom instruction mechanism [INST]<<SYS>><</SYS>>[/INST] for Llama2. The absence of a structured messaging type framework restricts the flexibility and interaction model that can be crucial for developer-centric applications.
Site like ChatGPT Playground https://platform.openai.com/playground

Benefits:
Improved interaction: This message types allow more interactive and intuitive communication model
Better UX: For Llama2 user, user dont need to type in
[INST]<<SYS>>any more, also allow user to swap LLM easilyFuture-proofing: ChatGPT playground already shown usecases
Proposal:
Support Multiple message and Message Type like System, User, Assistant for both ChatGPT and Llama2


Support extendable API for message type to allow conversational usecase, useful for things like ChatBot / Interview AI
{
"input": {
"question":"USA"
},
"messages": [{
"assistant": "USA is a ..."
}, {
"user": "How about Mexico?"
}]
}Technical
ChatGPT
From ChatGPT-3.5-turbo onwards they are supporting multiple messages
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
{"role": "user", "content": "Where was it played?"}https://platform.openai.com/docs/guides/gpt/chat-completions-api
Llama2

Consideration / Open Questions
How to handle maximum token size?
Advance user want to customize Llama2, how can they do it?
Log in to comment and vote
Comments3
Mei Wei Lim
Nov 23, 2023
Current limitation: inability to build a conversational flow
Suggestion: follow chatgpt style with 3 roles system, user and assistant in a JSON
Proposed solution
1. Allow user to specify whether its
ConversationalorCompletion2. If
Conversationalis selected, create a conversation/thread and reinject the context using the conversation/thread id3. If
Completionis selected, remain as beforeNotes: Applicable to all models we host internally. api format will be streamlined for all hosted models.
Johnson Lai
Oct 19, 2023
Following up on this, i make a simple Prototype
https://philosopher-gpt-johnson.vercel.app/prompt-to-llama2
https://weave.chasm.net/prompts/184
John Koh
Oct 1, 2023
For proposal 1., it makes sense to have better UI cues that separates out system/user messages like this. Agreed.
For proposal 2., this would require changes on our backend api side, right? I’m thinking this is more of an infrastructure handling on the long term. But yes, this is a way to handle stuff on the long run haha.