Test Your Pipeline in Playground
Time to test your pipeline!
Prerequisites
- If you're asking your colleague to test your pipeline, have a look at Guidelines for Onboarding Your Users.
- You must have a deployed pipeline.
Run Queries in the UI
- Log in to deepset Cloud.
- Click Playground.
- Select the pipeline and filters that you want to use.
Note: Filters are available only if the files have metadata. You can add metadata to your files when you're uploading them. These metadata then act as filters during the search.
Note: You can enable debug mode to log the response details and view them in Playground.
Debug Mode
You can enable debug mode right in Playgroudn to gain real-time insigts into your pipeline processing steps. Ask a question, wait for an answer, and then check the logs for the response details.
- Type your query and click Search.
Check Sources
Expand the Sources (1) section below the search result to view the documents and files it's based on. Click the More actions button (2) next to an answer to view the prompt that was used to generate it:
Run Queries with the REST API
Use the Search API endpoint. Follow the step-by-step code explanation:
Or follow these steps:
- Go to the Search endpoint documentation page.
- Enter the necessary parameters:
- Type the name of the pipeline to use for the search.
- Type the name of the workspace containing the pipeline you want to use in your target app.
- Optionally, add filters. (You can use metadata from your documents as filters to narrow down the search. For more information, see Add Search Filters.)
- Optionally, specify any runtime parameters.
- Type the queries.
- In the Bearer field, paste the API key you previously generated.
- Choose the programming language that you want to use and copy the code.
Here's an example request:
curl --request POST \
--url https://api.cloud.deepset.ai/api/v1/workspaces/WORKSPACE_NAME/pipelines/PIPELINE_NAME/search \
--header 'accept: application/json' \
--header 'authorization: Bearer api_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4NDU4ZGIyOC1kMTZlLTRkMzAtYTY2OS1lMDg1MDllNDY4YWV8NjQzY2Y5YTlmNzExNDg0MmUwNzk5ZDQ3IiwiZXhwIjoxNzA2Njg2MDUyLCJhdWQiOlsiaHR0cHM6Ly9hcGkuY2xvdWQuZGVlcHNldC5haSJdfQ.wh4_62gBcpfPVwYvrxlLtia7_YRaMpMx00EXWGP18IM' \
--header 'content-type: application/json' \
--data '
{
"debug": true,
"filters": {
"key1": "value1",
"key2": "value2"
},
"params": {
"param1": "value1",
"param2": "value2"
},
"queries": [
"my query"
]
}
'
See also Use Your Pipeline in Your Target App and Productionizing Your Pipeline.
What's Next
You can open or download each document containing the answer. To do that, hover over the three dots icon next to the document name.
You can also give feedback for each answer. Use the thumbs-up and thumbs-down icons. This way, you can let the pipeline creator know how the pipeline's doing.
As the pipeline creator, you can then analyze the feedback on the Pipeline Details page. Click the pipeline name to open it.
Updated 5 months ago