Test Your Pipeline in Playground

Time to test your pipeline!

Prerequisites

Run Queries in the UI

  1. Log in to deepset Cloud.
  2. Click Playground.
  3. 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.
  4. 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:

The Playground page with a search result displayed. The sources section below the result is marked as number 1, and the more actions button next to the result is marked as number 2.

Run Queries with the REST API

Use the Search API endpoint. Follow the step-by-step code explanation:

Or follow these steps:

  1. Go to the Search endpoint documentation page.
  2. 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.
  3. 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.