Trying to create a visualization for embeddings

I’m an intern for a remote position and am trying to build a text classification model using the Openai API - unfortunately I am just getting into coding and do not have the most experience. The code for how to visualize embedding space in 3D dimensions as shown in the recent blog post by openai (link to blog post:
Introducing Text and Code Embeddings in the OpenAI API) looks simple enough (here’s the link to the code: https://github.com/openai/openai-python/blob/main/examples/embeddings/Visualize_in_3d.ipynb) , but I don’t know how to make a JSONL file that could be read by it. unfortunately no JSONL file was provided so I can’t base my work off of one, If anyone could show me how to create a file that could be read by the embeddings endpoint and the visualization code, I would be incredibly appreciative. Thank you for your time!

2 Likes

I’m so excited to see what comes from this.

1 Like

Hi @curranjanssens

Here’s a great explainer on the JSONL files on the OpenAI docs.


Given this piece of code from the link: (https://github.com/openai/openai-python/blob/main/examples/embeddings/Visualize_in_3d.ipynb ), what part of the JSONL file would be where “category” would be

Thanks! that was my guess but I was a little lost, really appreciate your help

2 Likes