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, active 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 at search time.
Note: You can enable debug mode when asking a question. You'll then be able to check the logs and review your pipeline processing steps.
Debug Mode
You can enable debug mode right in Playground to gain real-time insights 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 workspace name 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 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": {
"field": "meta.field_name",
"operator": "<operator>",
"value": "field_value"
},
"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 More Actions icon next to the document name.
You can also give feedback for each answer using the thumbs-up and thumbs-down icons. This will let the pipeline creator know how the pipeline is 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