I’m making an assistant in OpenAI platform so that it generates the emails with the attributes provided.
Examples of these attributes includes the type of the email (Lead Generator, Webinar, Product Launch) etc and the theme of the email (Contrarian, Pop Culture, Storyselling etc). The knowledge contains the 6 of the types and 10 of the themes explained (each in it’s own document).
Now the problem is whenever I am asking it to generate the email with the description of the service or the product that the email will be promoting, it completely ignores the knowledge and generates the emails in a very generic nature as if I did not provide it any instructions.
Please help me in this regard and what I can do about it.
If you need any more context, please comment and I will update you with it.
I suppose you’ve created a custom GPT and supplied it with your own instructions. Have you tried to ask something easy like “Analyze the instructions”? what would it say?
Vector Store appears to be used only as a source of external knowledge in the Assistant API. Examples of emails should be explicitly provided in a prompt. GPT probably assumes it knows enough and doesn’t need to check the Knowledge storage.
Try to explain right into the prompt that GPT must go through examples from the Assistant vector store.
I cannot really upload the example emails into the prompt because:
Firstly, they are not example emails but the files contains the explanation about the characteristics of the emails that the assistant should be spitting out
As I mentioned in my original post, the there are 6 types and 10 themes. So explanation for each of them as in a single .docx file. Each file consists an average of thousand characters. So I cannot put them in the prompt instructions directly.
In the assistants playground, you can set the assistant to always require a tool call before it responds to a message. I don’t know how to do that programmatically though.
It’s something I also want to implement and would appreciate a way to do it programmatically.
Hey man, this worked flawlessly. The quality of the emails generated are unquestionable. However, I have a new problem.
For some reason the assistant is consuming 8k - 12k tokens for a single response. Is this even ideal?
For your info, the set of instructions I provided to the assistant is 45812 characters. Could this be a reason for that? Should I refine the instructions better?
Also what other things may be causing this insane amount of token consumption?
No I do not have anything in the vector store anymore. However the tokens consumption were way higher when I used vector store.
Moving the files into instructions part reduced the consumption however I think it is still high. And that is for each response. So this is not a viable solution as well.
Seems like the AI is querying the documents in the instructions for every chat. You can try fine-tuning then. It basically creates your own custom model for you…
Yeah that’s exactly what I was thinking too. I think I need to condense the instructions.
But I don’t understand why it reads all the instructions every time.
And one more thing I have realised now is that most of the instructions become redundant based on the input given to the assistant.
For example:
If the user choose the email theme to be “Storyselling”, then all the remaining theme explanations like “Contrarian, common mistake, case study” become redundant.
So somehow I need to tell the assistant to read the instructions based on the user’s input. Did you get what I mean?
The set of all instructions is ~45k characters/~10k tokens. Which is what is causing your token spike.
As you pointed out, you need to dynamically construct your instruction through function calling. You should be abl to reduce your token count by an order of magnitude or more.
I get. File search is supposed to handle this well with vector embeddings and search. It’s supposed to create a vector from the user query and use it to search through the vector database for something similar and then use that for the AI’s context.
Openai doesn’t seem to optimize this well. People have said pinecone might be better at this, which is what I’m currently looking at.