Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tmarti authored Jun 11, 2024
1 parent 141d77b commit d963786
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ Now you can navigate to http://localhost:5173/

1. Enter your OpenAI API key in the input field on the top (only used for calls to the OpenAI embedding's API)

2. On the dropdown, select a category. This will pre-populate a list of concepts related to the category. Now, press "Represent Category". This will generate thr initial category representation.
2. On the dropdown, select a category. This will pre-populate a list of concepts related to the category. For each concept in the category, a box will appear in the 3D area.

3. Finally, under "Your Concept" enter the concept you want explore and press "Represent Concept". You'll be able to inspect visually to which concept of thr category it lies semantically closer.
3. Finally, under "Your Concept" enter the concept you want explore and press enter. You'll be able to inspect visually to which concept of the category it lies semantically closer. The black ball will be placed in the 3D corresponding to your concept, and the semantically top-3 closest concepts will be informed.

## How it works

When the category is represented, the sentence embeddings for its concepts are generated. Then, those embeddings are projected into the 3d-space using UMAP. The UMAP projection is then saved and reused to represent "your concept", so that the 3d space for both the category and the concept has the same "semantic coordinate system".
When the category is represented, the sentence embeddings for its concepts are generated. Then, those embeddings are projected into the 3d-space using UMAP. The UMAP projection is then saved and reused to represent "your concept", so that the 3d space for both the category and the concept has the same "semantic coordinate system". In addition, in order to find the top-3 semantically closest concepts, the ones with the minimum diatance in tgr 3d space to the 3d position of "your concept" are picked. It would be also possible to base the distance function in the emebedding space instead of 3d space, but thr 3d space eas chosen for simplicity and because it also matches the 3d representation.

## If you try it and like it

Thanks! And please consider giving a ⭐ to the repo, it will be appreciated :)

0 comments on commit d963786

Please sign in to comment.