# Endpoints Sbert\_eduplex

## Endpoints usage

### Find ESCO skill best match based on different text (label and description) and languages (English and Deutsch)

GET <http://localhost:5000/match_desc_en/{string}> (deprecated)

GET <http://localhost:5000/match_desc_de/{string}> (deprecated)

GET <http://localhost:5000/match_label_en/{string}> (deprecated)

### Vectorise a text string based on the default LLM

GET <http://localhost:5000/vectorise> (not publicly available)

POST <https://proto.eduplex.eu/edu/api/v1/ai/sbert/vectorise> (publicly available, Authorization header is needed)

Request example:

```json
{
    "vectorise": [
        "Text A to vectorise",
        "Text B to vectorise",
        "Text C to vectorise"
    ]
}
```

@return: a JSON file with dimension, llm model, text to vectorise, and the numerical vector for eact text within the vectorise array

### Compute skills similariry of existing skills in english

GET <http://localhost:5000/compute_compare_skills/>

POST <https://proto.eduplex.eu/edu/api/v1/ai/sbert/computeCompareSkills> (Authorization header is needed)

Takes a JSON file with a pre-defined language and computes similarity scores for skills based on ESCO descriptions Similarity score is computed for each pair of skills. Currently only english is supported

Request example:

```json
{
    "language": "en",
    "skill": "Manage musical staff",
    "skills_eval": [
        "Manage musical staff",
        "supervise correctional procedures",
        "apply anti-oppressive practices"
    ]
}
```

Response example:

JSON file with cosine similarity scores

```json
{
    "0": {
        "base_skill": "Manage musical staff",
        "base_skill_id": 1,
        "eval_skill": "Manage musical staff",
        "eval_skill_id": -1,
        "score": -1
    },
    "1": {
        "base_skill": "Manage musical staff",
        "base_skill_id": 1,
        "eval_skill": "supervise correctional procedures",
        "eval_skill_id": 2,
        "score": 0.840195
    },
    "2": {
        "base_skill": "Manage musical staff",
        "base_skill_id": 1,
        "eval_skill": "apply anti-oppressive practices",
        "eval_skill_id": 3,
        "score": 0.788353
    }
}
```

### Vectorise a text string based on the default LLM

GET <http://localhost:5000/precomputed_compare_skills/>

POST <https://proto.eduplex.eu/edu/api/v1/ai/sbert/preComputedCompareSkills> (Authorization header is needed)

Takes a JSON file with a pre-defined serialised LLM and retrieves similarity scores for skills based on ESCO descriptions. Scores are retrieved from a previously vectorised model containing all vectors for all ESCO's skills trained with ESCO descriptions. Thus vector embeddings are not computed but retrieved, but semantic similarity is computed.

```json
  {
    "language": "en",
    "skill": "Manage musical staff",
    "skills_eval": [
      "manage musical staff",
      "supervise correctional procedures",
      "apply anti-oppressive practices"
    ]
  }
```

@return: JSON file with cosine similarity scores

### Vectorise a text string based on the default LLM

GET <http://localhost:5000/match_course_skills/> (not publicly available)

POST <https://proto.eduplex.eu/edu/api/v1/ai/sbert/matchCourseSkills> (Authorization header is needed, also including boolean param `sanitize_all`)

Takes a JSON.

```json
  {
    "language": "en",
    "title": "Manage musical staff",
    "description": "Manage musical staff",
    "learning_goals": "Manage musical staff"
  }
```

@return: JSON file with top k matches for title, description, and learning goals


---

# 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.eduplex.eu/text-analysis/report/software-design/endpoints.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.
