Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Quickstart example

The smallest runnable Recotem example. Trains a TopPop recommender from a tiny synthetic CSV (60 users, 20 items, ~850 rows). No network, no extras.

Files

  • recipe.yaml — minimal recipe (name, source, schema, training, output)
  • interactions.csv — synthetic interaction log with two columns: user_id, item_id
  • artifacts/ — created on first train; gitignored

Run

From the repository root:

# 1. Generate keys (once per machine). Copy the values into the exports below.
recotem keygen --type signing --kid dev
recotem keygen --type api     --kid dev

export RECOTEM_SIGNING_KEYS="dev:<signing-hex64>"       # signing: env_entry value (the 64-char hex from keygen)
export RECOTEM_API_KEYS="dev:sha256:<api-hash>"         # api:     env_entry value
export RECOTEM_API_PLAINTEXT="<api-plaintext>"          # api:     plaintext, for curl

# 2. Train
recotem train examples/quickstart/recipe.yaml
# → examples/quickstart/artifacts/top_picks.<sha>.recotem (signed)

# 3. Serve (foreground)
recotem serve --recipes examples/quickstart/

# 4. Predict (in another terminal)
curl -X POST http://localhost:8080/v1/recipes/top_picks:recommend \
  -H "X-API-Key: $RECOTEM_API_PLAINTEXT" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "u01", "limit": 10}'

What's next