Search
Test search in the Nuclia Dashboard
Once you have some files indexed, you can use the search input in the Nuclia Dashboard search widget page.
You can search using a plain sentence like:
Where is the Little Prince coming from?
Nuclia will return the most relevant results. And if you enable the Generative Answer feature, Nuclia will also generate an answer to your question.
See query syntax details for more information.
Publish your Knowledge Box
In order to let other people search your Knowledge Box, you need to publish it.
Go to the left navigation bar and click on Knowledge Box settings, then click on Publish.
Add a search widget to your website
To equip your website or web application with Nuclia search, the easiest way is to add a Nuclia search widget to your website.
The Nuclia search widget is a ready-to-use search input allowing users to search your Knowledge Box and display the results without having to write any code.
In the Nuclia Dashboard, go to the left navigation bar and click on Widgets.
Select the different features you want, copy the generated code snippet and paste it into your website.
Search using the API
You can search your Knowledge Box using the Nuclia API /find
endpoint:
curl https://<zone>.nuclia.cloud/api/v1/kb/<your-knowledge-box-id>/find?query=Where+is+the+Little+Prince+coming+from
See query syntax details for more information.
You can also get a generative answer to your question with the /chat
endpoint:
curl https://<zone>.nuclia.cloud/api/v1/kb/<your-knowledge-box-id>/chat?query=Where+is+the+Little+Prince+coming+from \
-H "x-synchronous: true"
The x-synchronous
header on the /chat
is mostly meant for testing purpose. The default behavior is to return a readable stream, as it allows to display the beginning of the answer without waiting for the end of the generation.
The x-synchronous
header makes the query slower, as it waits for the end of the generation before returning the answer.
See query syntax details for more information.