OneCreditMY/mle-take-home
À propos
Take-home assessment for early-career Machine Learning Engineers (0 to 2 years of experience) at OneCredit.
IA et apprentissage automatiqueProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- +5
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalMLE Take-Home: Company Recommendation System
Welcome to the Machine Learning Engineer take-home from the OneCredit Data & AI team. It's a simplified version of a system we run in production, where it powers company recommendations and lead generation.
Who it's for: people early in their career, with 0 to 2 years of experience. Fresh graduates are welcome.
If you applied, thanks for your time. If you didn't, we hope this helps you learn something new, such as RabbitMQ or pgvector.
Assessment version: 2026.11 (mle-v2026.11). What changed between versions is in CHANGELOG.md.
The scenario
When someone opens a company's page on the OneCredit portal, we want to show a "Similar companies" panel next to it. Someone looking at a coffee shop chain in Selangor should see other companies that do similar things.
The registry team already publishes every company change to a RabbitMQ queue. Your job is to build the service that powers that panel from the feed.
What the user sees
┌──────────────────────────────────────────────────────────────────────────────┐
│ OneCredit Portal Search companies… │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ Sinar Teguh Bakery Sdn. Bhd. SYN-001550 │
│ Food & Beverage · Selangor │
│ Operating cafes and coffee shops in the Klang Valley │
│ │
│ Similar companies │
│ ┌────────────────────────────────────┐ ┌────────────────────────────────┐ │
│ │ Seri Sejahtera Food Sdn. Bhd. │ │ Everbright Pacific Food │ │
│ │ Food & Beverage · Johor │ │ Sdn. Bhd. │ │
│ │ │ │ Food & Beverage · Kuala Lumpur │ │
│ └────────────────────────────────────┘ └────────────────────────────────┘ │
│ ┌────────────────────────────────────┐ ┌────────────────────────────────┐ │
│ │ Gemilang Delima Food Sdn. Bhd. │ │ Pacific Everbright Logistik │ │
│ │ Food & Beverage · Johor │ │ PLT │ │
│ │ │ │ Logistics · Kuala Lumpur │ │
│ └────────────────────────────────────┘ └────────────────────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
Clicking a card opens that company's page, with its own "Similar companies" panel.
How it works for the user
sequenceDiagram
actor User as Portal user
participant Portal as OneCredit portal
participant Service as Your service
participant DB as Postgres + pgvector
User->>Portal: Opens the page for SYN-001550
Portal->>Service: Similar companies for SYN-001550
Service->>DB: Nearest neighbours of SYN-001550
DB-->>Service: Closest companies
Service-->>Portal: Similar companies, most similar first
Portal-->>User: Page with the "Similar companies" panel
User->>Portal: Clicks Seri Sejahtera Food Sdn. Bhd.
Portal->>Service: Similar companies for SYN-000539
How the data gets there
flowchart LR
P[Registry feed<br/>producer] -->|company-events| Q[(RabbitMQ)]
Q --> C[Your consumer]
C -->|embed descriptions| E[Embedding model]
C --> D[(Postgres + pgvector<br/>similarity search)]
A[Your service] --> D
W[OneCredit portal] --> A
Notes from the registry team
The feed merges a few upstream sources and we don't validate what they send. Delivery is at-least-once, and every message has an AMQP
message_id. Each event carries the time the change happened at the source inupdatedAt. We own thecompany-eventsqueue and declare it as durable with no extra arguments. We can't change the format before your launch, so please work with what's there.
What the portal needs
- Recommendations that reflect the latest information we've received about each company.
- No lost companies. If a company is in the feed, users expect to see it on the portal and in other companies' recommendations.
- Fast enough to render while the company page loads.
The task
- Build a consumer that reads the
company-eventsqueue and stores each company in Postgres, with an embedding of its business description in pgvector. - Build the service the portal calls: given a company, return its most similar companies, with what the portal needs to draw each card in the mock above. Run the similarity search in Postgres with pgvector. Matching companies on their nature of business is enough for a first version.
- Write a short
DESIGN.mdcovering the decisions you made, the assumptions you made where the scenario was unclear, what you would change to handle 10x the volume, and what's left. - Optional, up to one hour of your six: go deeper in one area you're strong in. For example: how good the
recommendations are, latency at a realistic scale, how you'd monitor this in production, or a design for explaining
a recommendation with an LLM (a design only; no paid APIs). Write it up in
DESIGN.md.
The rest is your call: the schema, the embedding model, your tests and tooling, and the API, including what the portal gets back when something goes wrong. Tell us in your own README how to start your consumer and service, and we'll follow it.
Where the scenario leaves something open, make a reasonable call and write it down. There isn't one right answer.
Embeddings
Use an open-source embedding model that runs on a laptop CPU. Don't call a paid API. Some options:
BAAI/bge-small-en-v1.5, a small CPU model (384 dimensions), through fastembed or sentence-transformers. The panel in the mock above comes from it.- A placeholder while you build, such as a hashed bag-of-words vector, as long as you say so in
DESIGN.md.
Getting started
You need Docker, uv (it installs Python 3.14 for you) and just. Setup takes about 5 minutes and doesn't count towards your time.
just setup # install the producer's dependencies
just up # start Postgres (with pgvector) and RabbitMQ
just publish # publish the registry feed to the queue
just down # stop everything and delete the data
Postgres is at postgresql://postgres:postgres@localhost:5432/companies, and the RabbitMQ management UI is at
http://localhost:15672 (user guest, password guest). If those ports are taken on your machine, export
POSTGRES_PORT, RABBITMQ_PORT or RABBITMQ_UI_PORT in your shell before just up; just publish uses the same
RABBITMQ_PORT.
just publish sends the whole feed every time you run it. To start again from an empty queue and database, run
just down and then just up.
What's already here
.
├── data/feed.jsonl # the registry feed: 2,518 messages about 2,000 synthetic Malaysian companies, duplicates included
├── producer/publish.py # replays the feed onto the queue
├── docker-compose.yml # Postgres with pgvector, and RabbitMQ
└── Justfile # setup, up, publish, down
Add whatever else you need (uv add for libraries).
How to submit
- Click Use this template → Create a new repository, and make it public. Any name is fine.
- Build your solution in your copy, with
DESIGN.mdat the top level. - When you're done, fill in the submission form with a link to your repo and your résumé.
If the setup itself is broken (Docker, the services or the data won't start), open a Setup problem issue. Issues are public, so don't put your solution or personal details in one.
Time
Plan for 4 to 6 hours, within 7 days of creating your copy, and stop at 6 hours. If you run out of time, write down what you'd do next. A clear, honest "here's what's left" counts in your favour.
What we look at
- Does it work, and does it keep working?
- How you tested it.
- How you reasoned about your choices and assumptions in
DESIGN.md. - How readable your code is.
We don't expect a perfect or complete solution.
Using AI tools
Go ahead. Tell us in DESIGN.md which tools you used and for what. In the interview we'll ask you
to walk us through your code, so make sure you understand everything you submit.
After you submit
- We review your work as soon as we can.
- If we move forward, the next interview is a walkthrough of your code with us.
- Either way, you'll get written feedback by email.
- Your repo stays yours. Keep it public as a portfolio piece if you like.
About the data
Everything in this repo is synthetic. We generated it for this assessment.
- The companies, names, registration numbers, descriptions and events are made up. Any resemblance to a real company or person is a coincidence.
- No OneCredit customer data, credit data or production data is in this repo, and none was used to create it.
- Registration numbers use a made-up
SYN-format, so they can't be mistaken for real Companies Commission of Malaysia (SSM) numbers. - Your copy is public, so keep secrets, credentials and personal data out of it.
Explorer des projets similaires
Chargement…