Question & Answer

Google has been very successful by surfacing snippets of content that can answer users' questions, directly from the search results page. Now any site can have this superpower with Miso.

Example for Question & Answer

Introduction

When users type certain questions into Google, like "What's a recipe for chocolate chip cookies?", they can get an answer directly on the search results page. This answer highlights a piece of content from elsewhere, without requiring the user to exit and go to another site. It's a strategy that's been very effective, helping users get information more quickly and keeping them engaged without leaving the Google search results page.

Question Answering is different from every other Miso recipe because it doesn't require you to train an engine. Instead, you just need to set the enable_question_answering field to true when you upload your catalog of products/content.

Miso semantically analyzes and understands your content at a deep level and can also decipher the precise intent behind a user's question. The result is a highly powerful Q&A API that lets you mirror Google's functionality by answering users' questions with paragraphs extracted from the html field for your products. For example, Miso can take a question like What is python?, and extract an answer such as Python is an interpreted, object-oriented, high-level programming language. The raw text that Miso generates answers against is derived from a product's html field.

Please note that the Question & Answer recipe is quite specialized, and we recommend talking to your Miso solutions architect to decide on the right approach for your content. For example, you may also want to upload a Question Bank and implement Question Autocomplete .

Before You Start

API Call / JSON Response

To fetch your Q&A answers, POST to the Q&A API with the following minimum parameters:

  • q: The question user has entered.
  • min_probability: Miso assigns each answer a probability score (between 0.0 and 1.0) that determines how likely a paragraph can accurately answer the question. Answers that score lower than min_probability will be excluded from the response. A probability at least 0.7 is recommended, but you usually will need to fine-tune this threshold to find the precision-and-recall sweet spot for your application.

The API will return a list of nested list of potential answers, ranked by their probability score.

Note that Miso will only return answers from the html field and from products that have enable_question_answering set to true.

Example API Call

POST /v1/qa/question_answering?api_key=<API_KEY>
{
    "q": "what is gradient descent",
    "min_probability": 0.90,
    "rows": 5,
    "fl": ["title", "authors"]
}

Example JSON Response

{
   "message": "success",
   "data": {
      "took": 153,
      "miso_id": "937c5d70-ddf7-11eb-832d-ba7ee8b57635",
      "total": 38,
      "spellcheck": {
         "spelling_errors": false,
         "auto_spelling_correction": false,
         "original_query": "what is gradient descent",
         "original_query_with_markups": "what is gradient descent",
         "corrected_query": "what is gradient descent",
         "corrected_query_with_markups": "what is gradient descent"
      },
      "answers": [
         {
            "product_id": "9781492037330_ch02.html",
            "answer": {
               "probability": 0.99267578125,
               "text": "Gradient descent is a member of this path-finding class of algorithms. Variations of gradient descent exist, but ...",
               "css_selector": ":root>section>div>section:nth-of-type(2)"
            },
            "title": "Fundamentals of Deep Networks",
            "authors": [
               "Adam Gibson",
               "Josh Patterson"
            ]
         }
        ...
      ]
   }
}

Before You Launch

Using this API recipe as a starting point, test API calls in development
If you haven't already, build pipelines to stream your real-time data updates to Miso via API. Your Miso solutions engineer is here to help with the integration.
Start using this API recipe to power the UX on your site in staging. If you need UX recommendations, ask your Miso solutions engineer about Bento .
Run an A/B test with Miso on simulated website traffic. If desired, your Miso solutions engineer can perform this test and provide a report.
If this is your first time launching with Miso, ask your Miso solutions engineer to unlock your production environment.
Replicate your Data API calls on production.
Review your data in Dojo.
Turn on this recipe for a percentage of your users and scale up to a full rollout. Notify your Miso solutions engineer who will monitor the launch metrics.

API Reference

💻

Need more info on the API? Check out our dedicated API page with all the info you could ever want.

Read API Reference
Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add