![]() ![]() "exclude_hidden=True" just to be sure that if certain hidden documents are generated and saved in the docs-directory, these are not read as part of the dataset. This was partly due to the model, and partly because I didn't ask it to read everything. I initially had an issue with the reader only reading part of the files. "recursive=True" indicates that all files need to be read. The SimpleDirectoryReader needs certain arguments to be set. Given that the max input size is 32,768, this leaves enough room for sending messages to the LLM.Ĭhange in the code the model from gpt3.5-turbo to model_name="gpt-4-32k"Ĭhange to max_input_size = 32000 and num_outputs = 16000 The directory reader This means that when setting num_output to 16,000, you are telling the software to leave room in the prompt for 16,000 output tokens. The token limit for gpt-35-turbo is 4096 tokens, for gpt-4 it is 8,192 tokens and for gpt-4-32k it is 32,768 tokens - in the latter case about 50 pages of text. Every token generated is added back to the input before generating the next. Maximum token length: The token length combines the data from the question asked and the answer received, and the maximum token length that is allowed depends on the model. You will pay per 1,000 token model input and output, and newer models have a higher cost per token. ![]() These are groups of characters and as a rule of thumb, 75 words are 100 tokens. Tokens: Tokens are the basic unit that OpenAI GPT models use to compute the length of a text. Hallucination is when the AI gives a confident response that is not justified by its training data. GPT-4 is "smarter" than its predecessor and is more likely to produce factual responses than GPT-3.5, thus hallucinates less. Models: In ChatGPT you can make use of various models, and the latest model is GPT-4. I explain these changes further below: The GPT model, tokens, and input-output size Change the model's temperature and top_k values. ![]() Change settings in the directory reader.Change the model from GPT3.5 to GPT4-32K. ![]() More accurate would be to say I am prompt engineering an AI chatbot.Īfter testing various datasets, some changes were needed to the original code: The LLM processing of data takes place on the OpenAI servers and the embeddings will be saved locally. On a first run, all the data fed into it will be sent to the OpenAI servers where it creates 'embeddings' an embedding is a semantic index of the data so it can be searched semantically. I am not really training an AI chatbot, but feeding instructions, context and prompts to guide its performance. Setting up the software, based on the article "Training" the AI Chatbot As a next step you generate an API code and then load a little piece of code, which is available in the above-mentioned article and in an adjusted version at the bottom of this article. You do not need an ChatGPT plus account, but you will need an OpenAI account with a payment method added, to pay for tokens. The process of installing and updating Python, Pip and the needed libraries is straightforward. I followed the steps of the article " How to Train an AI Chatbot With Custom Knowledge Base Using ChatGPT API", given this process can - with some guidance - be duplicated by people who do not have a coding background. In this first post I will discuss the setup and "training" (more later on why I use quotation marks here) of an AI chatbot, and what to adjust for it to perhaps work. More on the results and the use of various structured and unstructured datasets in Part 2. That turned out to be rather complicated and with mixed results, given final evaluations in the Adaptation Fund do not have to follow a mandatory reporting structure. The idea was to train an AI chatbot for evaluative purposes with the dataset used for a synthesis of final evaluations that Caroline Holo and I collaborated on in the past, for which all final evaluation documents are publicly available. I got inspired to train my own AI chatbot by Kerry Bruce’s post " ChatGPT and Evaluation- 3 Key Takeaways", and especially by the statement "Even if your evaluation documents were in the right format for ChatGPT to ingest, ChatGPT would need to be retrained to look at “just” your content.". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |