🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 5 Min Lesezeit
0

Accelerating ClippyAI with Embedding LLM and Vector Database

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

This is a submission for the , which uses Ollama to automatically generate answers for repetitive emails.



As this was working quite well, I extended it to a multi-purpose application, which seamlessly integrates into the Windows or Linux/X11 clipboard to explain, summarize or translate texts. The only bottleneck so far has been the speed of running the LLM interference because to run larger models in Ollama at an adequate speed requires at least a modern CPU, or better a dedicated GPU.



Based on this contest, the idea to use an embedding LLM along with a vector database came to my mind. The database could serve as a cache to store the most common answers, so that there is no need to generate all of them.



In this project, I integrated an embedding LLM (nomic-embed-text) hosted by Ollama, a PostgreSQL vector database, and pg.ai to create a system that caches embeddings of template answers in a vector database. This setup allows for rapid retrieval of templates for similar questions or tasks, significantly reducing response times to only a few seconds on modern CPUs.






Basic Concept



Pg.ai provides us with the command ollama_embed, which can be used to send text to the embedding LLM nomic-embed-text hosted by Ollama. As result, it will return a vector with 768 dimensions. Such vector can be imagined like a compressed semantic description of the text. When you compare two resulting vectors of different text inputs by its euclidian distance, the meaning is the decisive factor, not the similarity in terms of the words or characters as it would be with classical string distance functions like the levenshtein algorithm.



Now instead of directly passing the clipboard data and the task to a generative LLM hosted by Ollama, it is first being sent to a PostgreSQL database.






Storing Embeddings



Embeddings are high-dimensional vectors that represent the semantic meaning of text. A vector database stores these embeddings to enable rapid similarity searches.



To use this concept, we must first fill our vector database with data.

Before storing, we concatenate the clipboard data with the task description in the variable @question.

Then we calculate the embedding vector for the @question variable and store it together with the answer generated by the general purpose LLM:




CODE
INSERT INTO clippy (question, answer, embedding_question, embedding_answer)
SELECT
@question,
@answer,
ai.ollama_embed('nomic-embed-text', @question);






From the ClippyAI GUI, this function will be executed when the thumb-up button is clicked, or the Store all responses as embeddings mode is active.



Embeddings which should not serve as templates, can also be removed by clicking the thumbs-down button.






Retrieving Answers from Embeddings



By using the extension pg.ai, the database can execute request to Ollama directly from a SQL query:




CODE
SELECT
answer,
embedding_question <->
ai.ollama_embed('nomic-embed-text', @question)
as distance
FROM clippy
WHERE embedding_question <->
ai.ollama_embed('nomic-embed-text', @question) <= @threshold
ORDER BY 3;






The <-> operator calculates the distance of two vectors and we are only taking results, which are below the user-specified @threshold variable.

Finally, we order the result set descending by the distance.

On the GUI side, users can scroll through the answers by pressing the >> button.






Benefits of This Integration





  • Enhanced Data Privacy: All data processing happens locally, ensuring high levels of data privacy.


  • Efficient Text Processing: Using an embedding LLM for text comparisions provides better results than just calculating the distance two strings, because the similarity is measured by a semantic likeliness.


  • Scalable AI Solutions: Combining PostgreSQL with pgai and pgvector allows for scalable and efficient AI solutions.


  • Cross-Platform Support: This setup works seamlessly on both Windows and Linux platforms.






Demo



Download the latest version at



After submitting a task:

Image description






Tools Used



In my project, I utilized several powerful tools to build the AI system:




  • pgvector: This PostgreSQL extension allows for efficient storage and retrieval of high-dimensional vector data, enabling rapid similarity searches.

  • pgai: Provided the ability to execute requests to Ollama directly from SQL queries, making the integration seamless and efficient.

  • pgai Vectorizer: The vectorizer tool from pgai was used to generate embeddings from the text, which are then stored in the vector database.

  • Ollama's nomic-embed-text: This embedding LLM was crucial for transforming text into high-dimensional vectors that capture semantic meaning.

  • Docker: I used the PostgreSQL + pgai container to set up and run the database environment smoothly.

  • .NET SDK 8.0: Open Source Framework for C# applications from Microsoft.

  • Avalonia: Platform-independent UI Framework for .NET






Final Thoughts



Building this application was an exciting journey. I learned a lot about integrating and using embedding AI models with vector databases. The combination of PostgreSQL, pgai, and Ollama proved to be a powerful setup for text processing tasks.



I believe this project could significantly enhance productivity in various domains by providing quick and relevant responses to common queries. The seamless integration into the clipboard makes it a handy tool for everyday use, and the local data processing ensures that user data remains private and secure.






Prize Categories



This submission may qualify for the following prize categories:




  • Open-source Models from Ollama: For utilizing Ollama with the free nomic-embed-text LLM.

  • Vectorizer Vibe: For integrating pgai Vectorizer and leveraging vector databases.






Team Submissions



This project was a solo effort, so no additional team members need to be credited.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Accelerating ClippyAI with Embedding LLM and Vector Database

Thematisch verwandte Begriffe: Accelerating, ClippyAI, with, Embedding · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...