Send me your GPT problems, I'll solve them for free and make a YouTube video

We are following your advise on using embeddings (not finetuning) for our chatbot. So we have a 200 pages document. We want to use Babbage (2048 token max). Do you have any video (I could not find one on your YouTube) on how to divide the file into 100 documents each 2 pages long (<2048 tokens) and create 100 embeddings?


I do have to confess that recommendation was based on intuition and some experience with chatbots and cognitive architecture.

The best way to break up a document I’ve found is to use the wordwrap module in Python. This allows you to rapidly break any document into equally sized chunks, which means you can get the most mileage out of your embeddings.

You can see an example of word wrap being used in my “compress anything” video.

Hope that helps.


how to finetune codex?

You dont, it is not a feature

I want to generate YouTube video ideas with the help of Open AI and YouTube Data v3 to get genuine next video ideas. I’m using the flask framework. Please make a video tutorial on this.

I don’t know if the original message is still valid, but I asked something which can be the actual title of a tutorial.
I’ve seen that others have struggles with the fine tuned models.

cant view
video is private

Hi David,
thanks again for video experiments you share on your video channel! The problem I submit/share with you/all the community is this:

How a chatbot, built using a GPT3-model, is allowed to call an external API,during/inside the dialog flow?

Suppose you build a chatbot as described in your nice video: Python & GPT-3 for Absolute Beginners #2 - Your first chatbot - YouTube : A python program follows the basic idea you live-coded in the above video: the program get user input sentence from the terminal, add the sentence at the bottom of a dialog turn, call the openai completion API appending the GPT3 response at the bottom of the growing text:

You are my personal assistant BOT expert on weather forecast. Everyday you give me advices and ideas related to the weather.

USR: blablabla
BOT: blablabla
USR: blablabla
BOT: blablabla

Now suppose we want to let the chatbot aware of the today REAL weather forecast in a specific location/city (e.g. Genova, Italy).

Suppose you have some web service API that returns the weather forecast. Let incapsulate that service under a python function with signature: request_weather(city). Usage example:

request_weather('Genova, Italy')
# 'today (25/12/2022) in Genoa the weather is beautiful, there is the sun and the temperature is 20 degrees.'

A first idea, for the dialog initialization, is to call the above function before the chatbot turns-exchange, injecting the weather forecast statement (ad any other useful DATA) in the above prompt. Like that:

You are my personal assistant BOT expert on weather forecast. Everyday you give me advices and ideas related to the weather.

Weather forecast: today (25/12/2022) in Genoa the weather is beautiful, there is the sun and the temperature is 20 degrees.

USR: blablabla
BOT: blablabla

Ok, but what if the user ask, at the middle of the initiated dialog, about the weather in another location, e.g. New York?
Suppose you want to answer the user, without a fake answer (GPT is able to invent anything if you let it be free) but instead answering the user with the real weather forecast in New York. In this case you do need to call the function request_weather('New York, USA').

In general, you want to call an external API inside the dialog. How to implement that feature?

1- What comes to mind is to catch the user “intent” before the GPT3 completion request, so you could implement an usual intent classifier on top GPT3. Maybe, but I do not like this solution because I need to implement that classifier by ‘hands’ with usual efforts (training the intent/entities phrases dataset etc. etc.)

2- Instruct the GPT3 model to reply a ‘command’ w (with a specified known syntax) when it match a known intent, as roughly shown here: OpenAI API. The idea here is to call the function grequest_weather when the model return this command inside the answer (let’s call this a back-command; So the python program could catch the back-command, run-it the function return text (say a text that describe the weather) and the dialog prompt will be appended with function return text as a response to the user. That sound good but I couldn’t make this work.

The general problem here is how to create conversational applications based on GPT3 but can accomplish task-oriented deterministic activities, taking advantages from the ‘partially-no-deterministic’ elaborations of generative systems. Practical examples? Consider a chatbot that help customers with usual informative answers but that allow to open a ticket on some help-desk system. Or consider a question/answering system that do need to retrieve some info in realtime, etc. etc.

Any idea? Any suggestion is welcome.

Wait, with text-davinci-003, the second approach seems to work! I inserted in the initial prompt some pseudocode instructions. See the example here below (sorry, in Italian):

Sei il mio assistente personale, esperto di meteo e previsioni del tempo. Ogni giorno mi dai avvisi ed idee sulle condizioni meteo. Per rispondermi, segui le istruzioni seguenti.

Io sono a Genova, Italia.

Se ti chiedo previsioni del tempo, prendi gli attributi e dalla conversazione precedente o chiedimeli se non li hai.
Rispondi con l’espressione: request_weather(‘<dove>’, ‘<quando>’)

TU: ciao, sono il tuo assitente meteo. Puoi chiedermi le previsioni o qualsiasi informazione sul meteo!
IO: Cosa mi dici del tempo nelle prossime ore?

TU: request_weather(‘Genova’, ‘prossime ore’)

IO: e a Palermo?

TU: request_weather(‘Palermo’, ‘prossime ore’)

IO: tititera tiritera

TU: Cosa volevi sapere?

1 Like

Hi David. Not sure if you are interested but I’m looking for help building my YouTube channel presenting research on the microbiome. I’m a dietitian.

Hi David,

Thank you for what you’re doing for the community!
I am actively trying to create an excel and Powerpoint add-in that uses the Codex API.
Would you be able to make a detailed step-by-step guide of how to do this?


Hi David, thank you for what your doing to this community,

I have a problem with the API in this topic:


Hello David,

My name is Ricardo Fernandes and I am a researcher at the Max Planck Institute for Geoanthropology. More information on our research group here: Systems Archaeology | Max Planck Institute for the Science of Human History

We are interested in a problem that has appeared previously in this thread. Summarizing and questioning collections of academic articles and books on a certain topic. In our case, we are interested in research questions concerning the study of the human past and of its environmental context.

A problem that we face in compiling historical information is that the study of the past is dispersed among multiple disciplines (e.g., history, archaeology, palaeoclimatology, etc). Plus it is often the case that historical research is written in local languages. Since English is the academic lingua franca there is a lot of historical research that does not become mainstream. This is also a barrier for historical researchers that are non-native English speakers. Their research is less visible and, in turn, they have less access to funding.

The above is the motivation for our AI research. To have a system in place capable of being queried on historical questions using academic sources written in multiple languages. We have a workflow in place for this that involves the use of scientific search engines, document formatting, translation, and text writing following prompts using an NLM (not GPT-3). However, the performance of the latter has not been the best and we are interested in testing GPT-3.

Would you be interested in helping us? We have funding for this project and all code that it generates can be made freely available (results also to be presented in a publication). If you are interested please contact me:

All the best,

Ricardo Fernandes

HI, I saw your vids and there are impressive. I am looking for someone for an MVP using GPT. Could I send you an email to describe what I am looking to do or how can I DM you ?

@daveshapautomator Hi David, I wan to finetune GPT-3 on my business context. I have a document that has organization’s context, policies and guidelines. I have questions and answers for finetuning. I am not able to figure out from Open AI documentation as to how should i point my fine tuning data ( i.e. prompt and completions ) to my file. Can you please guide me here?

1 Like

@lalituor the Embeddings API is what you’re looking for, not fine-tuning.

After embedding your documents you can combine search queries with GPT-3 to make the UIUX conversational if that’s your objective.

You might find this video helpful.

1 Like

Happy Cake Day!

Thanks for all your positive assistance on the forum, @wfhbrian …Good to have you here with us.

1 Like

Thanks for the warm welcome :hugs: I’m happy to be here!

1 Like

Creating a tool inside my web app using GPT3 and PHP (GitHub - orhanerday/open-ai: OpenAI PHP SDK : Most downloaded, forked, contributed, huge community supported, and used PHP (Laravel , Symfony, Yii, Cake PHP or any PHP framework) SDK for OpenAI GPT-3 and DALL-E. It also supports chatGPT-like streaming. (ChatGPT AI is supported))**

The tool writes service page content for local sites. When I paste a longer outline inside the textarea for it to write the full content for me using a single prompt I always get a 500 server error.

But when it is short I get a response back.

Sometimes it doesn’t return with a good amount of content for me. What is the best way to approach this.

is there any other option than embedding api for document question answering. Like I upload all the documents on open ai as my personal database for search, and when i ask a question open ai will answer from saved documents. Is it possible ?

Hello David, I like your channel.
Problem: I can’t access Bing Chat, GPT and ChatGPT from China.
Insufficient solutions:
vpn - Not enough, Openai also asks for a phone number and China/Hong Kong numbers are rejected.
Opera, Snapchat - They said they embedded GPT for free but it doesn’t seem so, looking from China…
Perplexity and work, perhaps something similar would satisfy me for short term.
Thank you for reading and,maybe, addressing this problem.