The prompt = “make observations and appropriate and expansive suggestions based on the assistant, Keywords, Entities and Summary” and the topic, history are defined in this function. The Keywords, Entities and Summary, which prime the prompt, are the product of an NLP analysis.
function Do_NLP_Analysis() {
// do an NLP analysis
Keywords = Do_Keywords() // uses fast-gpt-j
Summary = Do_Summary() // uses finetuned-gpt-neox-20b
Entities = Do_Entities() // uses Google Cloud Natural Language
return;
}
This is an interesting use. One could expect the AI to interpret this as though it was all user input, perhaps similar meaning to the AI as if it was all passed in one role.
It also, though could be seen as more likely to be out-of-context. The AI can take a series of user inputs like that, like a chat history with the AI replies omitted, and understand that the prior user inputs are the turns of earlier questions, just a topic to be remembered.
In your prompt, you refer to these, but it seems you’re not guaranteeing the AI knows what you are talking about.
You might want to ensure some contextual understanding for each role’s data by text injection, such as f"Documentation - here’s keywords for my query: {keyword_string}", and so on.
Thanks for your thoughtful observations and I have tried to test for your caution. From what I’ve seen the engine progresses sequentially through the user/content statements and is evaluating the keywords, entities and (newly added) - Ideas = Do_Ideas() // uses either GPT-4 or 3.5-turbo