TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/No-Country-simulation/G9-LATAM-Team-58/llms.txt
Use this file to discover all available pages before exploring further.
/embed endpoint generates a single 384-dimensional L2-normalized embedding vector for a given text string using the intfloat/multilingual-e5-small sentence transformer. It is called internally by the Spring API for two distinct purposes: encoding search queries (for GET /search) and encoding documents at ingestion time (for POST /content). The type parameter controls which E5 asymmetric prefix is applied before encoding — getting this right is critical for retrieval quality.
This is an inference service endpoint — it runs on FastAPI (port 8000) and is not exposed to the public internet. This documentation is for developers running, testing, or integrating the inference service directly.
Endpoint
http://inference:8000 (internal Docker network); http://localhost:8000 when running locallyAuth: None
Content-Type:
application/json
Request Body
The text to encode into an embedding vector. May be a search query or a document body depending on the intended use.
Encoding mode. Must be exactly
"query" or "passage" (Pydantic Literal validation). Any other value returns a 422 Unprocessable Entity error. See the table below for which value to use in each context.The query vs passage distinction
The intfloat/multilingual-e5-small model uses asymmetric prefixes to differentiate query embeddings from document embeddings. Passing the wrong type silently produces an embedding in the wrong subspace, degrading cosine similarity scores without any error.
type | E5 prefix applied | Formatted input | Used for |
|---|---|---|---|
"query" | "query: " | "query: {text}" | Search queries (GET /search) |
"passage" | "passage: " | "passage: {text}" | Document indexing (POST /content) |
Response — 200 OK
A 384-dimensional L2-normalized float32 vector. Each element is a floating-point number in the range approximately
[-1, 1]. The full vector is 1536 bytes when stored as float32. When persisted in Oracle via the Spring API, this vector is converted using VectorUtils.toBytes().Example
Request
Response
Error Codes
| HTTP Status | Description |
|---|---|
422 | type is not "query" or "passage". Pydantic rejects the value at deserialization time before any model inference occurs. |
503 | Model not loaded — the inference service is still initializing or the artifact failed to load. |
422 error response
Implementation notes
The embedding returned by
/embed is 384 floats (1536 bytes as float32). When stored in Oracle through the Spring API, it is serialized using VectorUtils.toBytes() and written to an Oracle VECTOR column. The same conversion is applied to query embeddings at search time before VECTOR_DISTANCE is computed.