## Feature Extraction

Feature extraction is the task of converting a text into a vector (often called "embedding").

Example applications:
* Retrieving the most relevant documents for a query (for RAG applications).
* Reranking a list of documents based on their similarity to a query.
* Calculating the similarity between two sentences.

{{{tips.linksToTaskPage.feature-extraction}}}

### Recommended models

{{#each recommendedModels.feature-extraction}}
- [{{this.id}}](https://huggingface.co/{{this.id}}): {{this.description}}
{{/each}}

{{{tips.listModelsLink.feature-extraction}}}

### Using the API

{{{snippets.feature-extraction}}}

### API specification

#### Request

{{{constants.specsHeaders}}}

{{{specs.feature-extraction.input}}}

#### Response

{{{specs.feature-extraction.output}}}

