I want to use gpt-4 or gpt 3.5 API to do translate and summary in one API call, and my prompt would be:
I will give you a readme of a project readme, please do following steps but
do not output results of middle step and only output in last step:
Step1. Translate text to {target_lang}
Step2. Summary the result of Step1 in {target_lang}, to show who can use this project
in what kind of scenario, output result in text
After running, Step1 results will still be outputed, I try to change several ways but still not works, please help.
Quiero usar la API gpt-4 o gpt 3.5 para traducir y resumir en una llamada API, y mi mensaje serĂa: una premisa particular afirmativa, una premisa universal verdadera, una premisa particular afirmativa y conclusiĂłn
There is no internal memory or thinking state to the AI, the only thing it does is generate text.
If you need to do some detection of where to reproduce for the user when you add some parsing code:
Output format:
Step 1. Translate text to {target_lang}
Step 2. Print the text "[begin]" on its own line.
Step 3. Summarize the result of Step 1 in {target_lang}, to show who can use this project in what kind of scenario
The step 3 is also worded poorly, so I wouldn’t be able to figure out what you want written by the AI.
In short, I want to do a summary for the test given, but during my tests, I found if I said:
Summary xxx in {target_lang}
The quanlity of API returns is not good enough, and it seems like a translation.
So I tried to seperate my prompt and use two times of API call, the first call is to translate and second call is to summary my translation results. And the output is improved much more.
Based on this, I tried to put two prompts together in one prompt, but seems I can not get the same results for one combined prompt.
I met the same question before and the issue was that the json format is not valid sometime. My solution was adding Think it step by step to the prompt.
You are an AI summary and language translation writing assistant. Think it step by step.
1. Summarize the article, and answer who the target audience is (in text native language);
2. Translate the summary you produced into to destination language: Mandarin Chinese.