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: , 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!


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: ( ), 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