PromptQL is a data access agent that creates and executes query plans to retrieve data with 100% accuracy for business critical applications. By integrating web search in PromptQL, you can enrich your private data – stored in any systems like Snowflake, BigQuery, PostgreSQL, MongoDB, or accessed through APIs – with current real-time details from the web.
For example, you might query customer records in PromptQL and supplement that data with the latest public updates about those companies or individuals. Access to web search just opens up a lot of use cases.
New to PromptQL? Please check out our website and documentation for a quick Getting Started Guide.
In this post, I’ll explain some learnings from implementing web search connectors, showcasing various options available to you, and providing simple TypeScript examples to help you integrate these tools into your PromptQL setup. I also have some personal recommendations and notes on which tools work for what use case.
Web search tooling in the context of GenAI
As I worked on integrating web search into PromptQL, I explored various tools for real-time search and AI-powered retrieval. Some had APIs and some didn’t. But before I delve deep, I wanted to point out that there are two distinct types of search tools.
- First, traditional web search engines like Brave Search and DuckDuckGo work by executing a keyword-based query and returning a set list of results – typically around 10 links for further exploration. You can feed the LLM these 10 results for some summary based on title/description or some URL extraction tasks.
- In contrast, AI-powered search retrieval systems, such as Perplexity and Google Gemini Grounded with Google Search, integrate a language model with the web search functionality. They do not return a dump of search results necessarily but analyze and summarize the information, delivering a concise and real-time response.
Web search tooling landscape
Alright, so with the above distinction out of the way, here are my observations about these tools.
I wired up some TypeScript code for the following search tools:
A quick reminder: You can write custom TypeScript or Python functions – using Hasura DDN Connectors – to implement any business logic you need, and then expose those functions directly to PromptQL.
Brave Search
Brave Search is a solid option if you need classic search results. Its API returns detailed information such as titles, descriptions, URLs, timestamps, and other payloads. Refer here for their documentation.
DuckDuckGo Search
An alternative to Brave Search, DuckDuckGo Search supports web search in real time to query and return a list of search results that PromptQL can operate on. They have an API and client SDKs that you can use to get search results.
Google’s Gemini API + Grounding with search
This combination leverages Google’s massive search index and the performance improvements of Gemini 2.0 Flash models. By grounding the output of Gemini Flash models with the traditional Google Search tool, it ensures you receive fast, high-quality, and up-to-date information.
Perplexity AI
Perplexity delivers impressive results on its user interface; however, its API is currently based on older / inferior models. This limitation can make it slightly less reliable for applications that depend entirely on real-time, up-to-date data. There is probably an ad monetization play here to limit what you can do with the API.
SeachGPT by OpenAI and other tools
I wanted to try out SearchGPT, but unfortunately, it didn’t have an API and I believe it is a wrapper over Bing Search with AI-powered responses. Similar to Perplexity UI, the responses are really good here with their UI, but it’s bummer they don’t have an API.
I briefly explored very specific search tools like Exa Web (which is closer to real-time search but isn’t always accurate) and Tavily (which wasn’t reliable in people search) and didn’t find them better or more accurate than the above options.
Web search connector quickstart guides
In this section, I’ll link to the implementations of these web search functions, most likely in TypeScript or Python with their respective source code.
Summary
By integrating these connectors with your custom business logic – potentially using TypeScript or Python functions via Hasura DDN – you can enrich data from any private source with up-to-date public information. Each connector is designed to suit different needs: choose pure search for direct keyword results or AI-powered retrieval for synthesized, summarized insights.
New to PromptQL? Take a look at the recent webinar titled "Beyond RAG: Building Enterprise AI Assistants That Users Actually Trust". Learn how to leverage PromptQL’s latest features to build reliable, scalable AI assistants for enterprise use cases. Register now and take your AI-powered applications to the next level!