Structuring Fine Tuning w/ keeping our docs + api in sync

Hi there,

I’m trying to keep our documentation in sync with our API. I’m looking for a way I can run a command and auto-update deprecated methods and add new ones, etc using OpenAI.

Note: I know there are some great doc tools out there, but I’m having fun exploring OpenAI and would like to try see if I can get close using the API :slight_smile:

After reading the fine tuning docs, I’ve noticed I need an input and an output. The way I think about that right now is:

input: API function code
output: documentation for API function code

Then, perhaps, I could paste in new functions every time they’re updated and generate a new markdown file with the changes

Is what I’m saying making sense? Is there a better way to approach this? This method could work, but I think it would require a lot of up front work.

Thanks!

Welcome to the community.

Check out @raymonddavey’s recent post history here in the forum and search around. There’s some others that have already done the leg work, I believe.

Good luck.

ETA: As you’ve found, @nelson has a terrific thread going as well.

3 Likes

Thanks for the kind words @PaulBellow.
Welcome to the community @peterpme

So, let’s be clear, please everyone :slight_smile: The OP seems to be asking about API documentation generation, not how to fine-tune using the API :slight_smile:

You are not talking about file-tuning at all, @peterpme… isn’t that right?

You are talking only about OpenAIs API documentation and are asking OpenAI staff to create some method where the OpenAI documentation is auto-generated from the API is that right, @peterpme ?

I ask this because you talk about a “markdown file”, and of course there are no “markdown files” used when uploading files to be fine-tuned. Only JSONL files are uploaded.

@peterpme said …

SO, when you talk about “markdown” you must be talking about the OpenAI API docs, correct @peterpme ?

Or, are you asking for a structure to the API docs so you can auto-update the API based on your local copy of the API docs?

Omega Rising !

Hey,

Markdown is a popular format used for any coding documentation site. I’m trying to update my own documentation site based on my own API changes.

I was thinking about using fine tuning to make this work but I wasn’t sure if that was the right approach.

You are right that the fine tuning models require JSONL. I was thinking about using the file api to upload my markdown files or inject them into the JSONL format programmatically

Thanks!

Hello! I appreciate the tip, thank you! I will search through the threads

Yes, I know what markdown is, LOL… I use markdown every day. I write code which outputs with Markdown and run forums which uses Markdown as well. :).

You don’t need GPT chatbots with knowledge bases from 2021 to do this task.

There are better way than using GPT. GPT is great; but it just one tool in the toolbox for developers.

I think there are much better ways to update your documentation than to use GPT, in my view. GPT has a high hallucination rate anyway. There is zero change your technical docs will not have many errors using this method, no matter how much time you spend fine tuning.

It’s like when you use GPT to write code. You get a nice first draft sometimes, but it’s often very inaccurate or way off base. The same is true for code autocompletions using GPT. Yeah, sometimes they are very useful, other times, super annoying. GPT models are not expert systems. They just generate text and are not very accurate, as everyone here slowly seems to be learning when the actually work on facts and not fiction or fantasy.

HTH

Hey, I appreciate your response! I understand there’s better ways, I’m just exploring :slight_smile:

I was thinking it would be relatively straight forward for GPT to pick up on whether the method name and params have changed vs. what’s in the docs? I’m not saying it needs to generate the docs from scratch, just update the function names that have changed

Does that make sense? Thanks!