Search
Code127
"slug": "val-vibes", "link": "/blog/val-vibes", "description": "How to build semantic search with embeddings for Val Town within Val Town itself", "pubDate": "Tue, 18 Jun 2024 00:00:00 GMT", "author": "JP Posma",
"slug": "val-vibes", "link": "/blog/val-vibes", "description": "How to build semantic search with embeddings for Val Town within Val Town itself", "pubDate": "Tue, 18 Jun 2024 00:00:00 GMT", "author": "JP Posma",
/** * Calculate similarity score between two texts using OpenAI embeddings */export async function calculateSimilarity(text1: string, text2: string): Promise<number> { const response = await openai.embeddings.create({ model: "text-embedding-3-small", input: [text1, text2],
- **Frontend**: HTML, CSS (Tailwind), and TypeScript with React- **Database**: SQLite for storing resumes and job requirements- **NLP/ML**: OpenAI embeddings for semantic matching## Project Structure
// Search for relevant memories based on a queryasync function searchMemories(query: string): Promise<Array<{ id: number; content: string; tags: string; created_at: string }>> { // Simple search implementation - could be improved with embeddings or more sophisticated search const results = await sqlite.execute( `SELECT * FROM ${MEMORY_TABLE} WHERE content LIKE ? OR tags LIKE ?`,
## Future Improvements- Implement vector embeddings for more accurate memory retrieval- Add memory management features (edit, delete, categorize)- Improve search with semantic similarity rather than just text matching
async function main() { const generateEmbeddings = await pipeline("feature-extraction"); const embeddings = await generateEmbeddings("Hello, World!"); console.log(embeddings);}
"slug": "val-vibes", "link": "/blog/val-vibes", "description": "How to build semantic search with embeddings for Val Town within Val Town itself", "pubDate": "Tue, 18 Jun 2024 00:00:00 GMT", "author": "JP Posma",
"slug": "val-vibes", "link": "/blog/val-vibes", "description": "How to build semantic search with embeddings for Val Town within Val Town itself", "pubDate": "Tue, 18 Jun 2024 00:00:00 GMT", "author": "JP Posma",
"slug": "val-vibes", "link": "/blog/val-vibes", "description": "How to build semantic search with embeddings for Val Town within Val Town itself", "pubDate": "Tue, 18 Jun 2024 00:00:00 GMT", "author": "JP Posma",