Semantic Search
Search based on meaning rather than exact keyword matches, allowing users to find relevant content even when exact terms don’t match. Learn more about Semantic Search.
Basic Search
Sometimes you need to find documents about a topic, but they might use different terminology. For example, using search.about()
, when searching for “AI applications”, you’ll find relevant documents even if they use terms like “machine learning systems” instead.
const {
data: { payload }
} = await unbody.get
.textDocument
.search.about("AI applications")
.select("title", "autoSummary", "text")
.exec();
Search with Concept Boost
When your search needs to prioritize specific aspects, you can boost certain concepts. For instance, if you’re looking for AI applications but want results focused on “Deep Learning”, “LLM”, and “chatbot”, use concept boosting to get more relevant results.
const {
data: { payload }
} = await unbody.get
.textBlock
.search.about("AI applications", {
moveTo: {
concepts: ["Deep Learning", "LLM", "chatbot"],
force: 0.5
}
})
.select("text")
.limit(5)
.exec();
Advanced Search with Concept Steering
When you need to focus on specific concepts while avoiding others, concept steering is the answer. For example, to find modern chatbot documentation while excluding legacy approaches, you can steer the search toward NLP and LLMs while steering away from rule-based systems.
const {
data: { payload }
} = await unbody.get
.textDocument
.search.about(["Modern AI Chatbots", "Large Language Models", "Conversational AI"], {
moveTo: {
concepts: [
"Natural Language Processing",
"ChatGPT",
"Machine Learning",
"Customer Service Automation"
],
force: 0.7
},
moveAwayFrom: {
concepts: [
"Rule-based Chatbots",
"Legacy Systems",
"Basic FAQ Bots",
"Traditional IVR"
],
force: 0.8
},
certainty: 0.6
})
.select("title", "autoSummary", "tags", "createdAt")
.sort("createdAt", "desc")
.limit(5)
.exec();
Learn more in our Semantic Search Guide.