# Linking Metadata

{% hint style="info" %}
SampleSets are still a work in progress. Watch your inbox for notifications from KBase Outreach when these workflows go live.&#x20;

If you are interested in beta testing these Apps, please contact us at <engage@kbase.us>.
{% endhint %}

A Sample in KBase represents measured material from an experiment. It has a unique ID internal to KBase, aliases, related Samples, and structured metadata. Samples occur within a Narrative as a SampleSet, but the same Sample may be shared by multiple SampleSets.&#x20;

One key feature is linking the same data across many users and analyses. To do this, Sample aliases allow the same data uploaded by different users to be linked and connect different analyses of the same data. These aliases can also be used to link Samples in KBase with other methods of sample registration, such as ESS-DIVE or SESAR.&#x20;

Because the metadata about a sample is critically important for, KBase provides the option to [upload metadata spreadsheet](/data/upload-download-guide/sampleset.md)s to link Samples for more detailed analysis.

{% embed url="<https://youtu.be/PFWNWji8p0U?t=1536>" %}
Managing Linked Data
{% endembed %}

### During upload and import

Once a [SampleSet](/data/upload-download-guide/sampleset.md) is in system, it can be used when uploading [amplicon](/data/upload-download-guide/amplicon-matrix.md) or [chemical abundance](/data/upload-download-guide/chemical-abundance-matrix.md) matrices into KBase. This allows the amplicon and chemical abundance analysis to remain linked to the sample metadata and enrich analysis.

When uploading and importing either an amplicon matrix or chemical abundance matrix, select the corresponding SampleSet from the dropdown menu for the input before running the Import App.

### Additional Data Links

Additional existing data can be linked to samples. The app "Link Workspace Objects to Samples" provides a graphical interface for creating the links. In this app, you can select the SampleSet to create links from, then choose the Sample from the set and object from the Narrative. You can add multiple Samples and objects by clicking the + button.&#x20;

If you have a large number of links to create, it would be advisable to use the "Batch Link Workspace Objects to Samples" app.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kbase.us/data/samples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
