FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
janpaul123
janpaul123valtownsemanticsearch
Remix of pomdtr/valTownSearch
Public
Like
3
valtownsemanticsearch
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
Sign up now
Code
/
Code
/
Search
Open in new tab
README.md

😎 VAL VIBES: Val Town Semantic Search

This val hosts an HTTP server that lets you search all vals based on vibes. If you search for "discord bot" it shows all vals that have "discord bot" vibes.

It does this by comparing embeddings from OpenAI generated for the code of all public vals, to an embedding of your search query.

This is an experiment to see if and how we want to incorporate semantic search in the actual Val Town search page.

I implemented three backends, which you can switch between in the search UI. Check out these vals for details on their implementation.

  • Neon: storing and searching embeddings using the pg_vector extension in Neon's Postgres database.
    • Searching: janpaul123/semanticSearchNeon
    • Indexing: janpaul123/indexValsNeon
  • Blobs: storing embeddings in Val Town's standard blob storage, and iterating through all of them to compute distance. Slow and terrible, but it works!
    • Searching: janpaul123/semanticSearchBlobs
    • Indexing: janpaul123/indexValsBlobs
  • Turso: storing and searching using the sqlite-vss extension. Abandoned because of a bug in Turso's implementation.
    • Searching: janpaul123/semanticSearchTurso
    • Indexing: janpaul123/indexValsTurso

All implementations use the database of public vals, made by Achille Lacoin, which is refreshed every hour. The Neon implementation updates every 10 minutes, and the other ones are not updated. I also forked Achille's search UI for this val.

Please share any feedback and suggestions, and feel free to fork our vals to improve them. This is a playground for semantic search before we implement it in the product for real!

Screenshot 2024-05-30 at 11.15.26.png

Migrated from folder: semanticSearchPrototype/valtownsemanticsearch

Code
README.md
H
main.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.