> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tags

While using PromptLayer, over time the number of logs will grow, making it difficult to find what you are looking for. Tags are a great way to help keep things organized.

Tags can be used for whatever you want, but the top 2 ways are to:

1. Keep track of which application you are working on
2. If you are chaining prompts together, where you are in the pipeline

For example, if you are working on an email application that has three chained stages, it would be a good idea to tag all the requests in this application with `email` and the corresponding stage `stage-x`

To add tags using the `run()` method:

<CodeGroup>
  ```python Python SDK theme={null}
  from promptlayer import PromptLayer
  pl_client = PromptLayer()

  response = pl_client.run(
    prompt_name="my-prompt",
    input_variables={"name": "world"},
    tags=["pipeline3", "world"]  # 🍰 PromptLayer tags
  )
  ```

  ```js JavaScript theme={null}
  import { PromptLayer } from "promptlayer";
  const plClient = new PromptLayer();

  const response = await plClient.run({
    promptName: "my-prompt",
    inputVariables: { name: "world" },
    tags: ["pipeline3", "world"],  // 🍰 PromptLayer tags
  });
  ```
</CodeGroup>

You can also pass tags when using `log_request` or the REST API endpoint `/log-request` ([read more](/reference/log-request)).

This will then show up on your PromptLayer dashboard:

<img src="https://mintcdn.com/promptlayer/jUVR1Bx755pIFGwB/images/tags.png?fit=max&auto=format&n=jUVR1Bx755pIFGwB&q=85&s=12e8c5889e88daef3bcd2f795529bb7b" alt="" width="50%" data-path="images/tags.png" />

And can be filtered by clicking on the tags button by the search-bar:

## <img src="https://mintcdn.com/promptlayer/jUVR1Bx755pIFGwB/images/tag-filter.png?fit=max&auto=format&n=jUVR1Bx755pIFGwB&q=85&s=f0fe4776add090dbb7991cefac014cd5" alt="" width="50%" data-path="images/tag-filter.png" />

Please note that tags are optimized for categorization based on a small number of predefined options. For request enrichments with n > 1000 options, please use [metadata](/features/prompt-history/metadata) instead.
