Overview
Our customers entrust us with their content, and in order to then gain a real business benefit from their content, they want to provide selective, context-aware access to it to their customers, depending on their needs. Search is how we help customers present their data, based on the context their customers provide, in the form of a query. That’s the beauty of AI-based, near-text, semantic search, and that’s why we use it at Gloo. For example, if one of our customers adds articles and podcasts about keeping a marriage strong, and during one of the podcast episodes, the discussion focuses on the guest’s top five rules for keeping a marriage healthy, we will likely want search queries that ask for “secrets to a happy marriage” to include in that particular podcast in the results. The word “secret” doesn’t necessarily have to be included in the content, and the word “rule” doesn’t have to be in the search query, but nevertheless, the results should include this podcast episode.Why use Search?
Specifically, search allows you to query your ingested content, to see what you’re presenting to the world, through Gloo AI. Our API returns your content, broken up into snippets, showing what we provide to our internal chat-based tools, and what you can use in your own applications. Snippets are sections of a content item, e.g. podcast episode, article, book, that represent a large enough piece of meaningful information to be searchable, and understandable by our AI tools. These snippets also represent a recorded unit of searchable content within our backend systems.RAG - Retrieval Augmented Generation
When constructing an AI application, it is sometimes useful to provide additional context to the AI model. Retrieval Augmented Generation allows you to insert these search results in the message to the model, and this can provide a more successful, context-aware interaction with your customers.Making Requests
Prerequisites
Before making a request, you must know which publisher’s content you would like to query.- Find Your Tenant (Publisher Name): First, navigate to the Organizations page in Studio and click “View Publishers”. Your Tenant is the name of the publisher you’re querying.
- Identify the Collection: A collection is where we keep the content for our customers. The only collection you’ll need to specify in requests is
GlooProd
. You must specify this in thecollection
field.
NOTE: You will only have access to your own publisher’s tenant through this endpoint, and a tenant must be specified. Other requests will result in a 403 “Forbidden” response.
How many records can I retrieve?
We recommend anywhere from 10 to 100 results, though request time will rise non-linearly with larger result sets. Thelimit
field is how you specify how many records to return.
How do I make a request?
Once you have your tenant name, you’re ready to query the search endpoint. You can acquire an API key by visiting the API Credentials page and following those instructions to generate a token using the OAuth2 Client Credentials flow. Endpoint:POST /v1/kallm/search
Example cURL Request
cURL
JSON