Learn about folders, documents and fragments
Last updated: 28 October 2022
Use our REST like api to index documents and FAQs, ask questions and perform semantic searches.
During the onboarding process you will be assigned a tenancy. This is typically a 10 digit alphanumeric string. Your tenancy id must be specified for all endpoints as a path prefix:
All calls (including read only calls) require authentication. You must pass a valid
Be sure to use read only keys in client side code!
Developing against a live endpoint is not ideal. Real credentials must be used, data must be submitted and indexed before querying etc. To aid development we’ve provided a stubbed API which validates requests, but returns constant, stubbed responses:
The tenancy path parameter and X-Api-Key header must be sent but they aren’t checked, so you can pass anything.
For example this is a valid request:
$ curl -X GET --location \
-H 'X-Api-Key: todo' \
The examples in this document use the stubbed endpoint. Remember to switch over to the real endpoint !
When you submit a document through our API it is queued and subsequently indexed. The time taken to index a document varies depending on the complexity of the document itself, along with the workload at the time. It could take anything from a couple of seconds through to one hour.
Indexing is eventually consistent therefore you should not assume that a document can be queried immediately after it was submitted. This is one reason to use the stubbed endpoints during development.
Viko supports two modes of query: searching and question answering.
Semantic search is similar to a typical full text search operation. Given a phrase, Viko will return the most relevant fragment or document. For example, given the search phrase “shipping rates”, Viko might return the pricing section of the shipping document.
Question answering goes deeper than semantic search. Given a question, Viko will first find the most relevant fragments then extract or generate an answer based on the information (context) within the fragments. For example given the question “how much is next day shipping?”, Viko might answer “$4.95”
Want to see Viko in action? Try our interactive demos