LLM Feature Extraction for Content Categorization and Search Query Understanding

canva · Tech · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Content discovery feature extraction

Canva needed faster and cheaper feature extraction for search query categorization and content page clustering without building separate bespoke NLP pipelines for every text shape and taxonomy.

Constraints:

Architecture

Canva evaluated LLM APIs and embeddings as a middle-layer feature extractor. For search query categorization, a few-shot prompt with fewer than 10 examples outputs predefined intent classes at inference time, avoiding custom classifier training. For content page categorization, LLM embeddings on plain page text replace scattered keyword extraction, summarization, keypoint extraction, and open embedding combinations, producing semantic representations for clustering pages into topics.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  Search_query_aggregation["Search query aggregation"] --> Few_shot_intent_prompt["Few-shot intent prompt"]
  Few_shot_intent_prompt --> LLM_API_classifier["LLM API classifier"]
  LLM_API_classifier --> Intent_feature_output["Intent feature output"]
  Intent_feature_output --> Downstream_categorization["Downstream categorization"]
  Content_page_corpus["Content page corpus"] --> LLM_embedding_extractor["LLM embedding extractor"]
  LLM_embedding_extractor --> Clustering_evaluator["Clustering evaluator"]
  Clustering_evaluator --> Downstream_categorization
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Search query aggregation Preprocessing layer that reduces raw query volume before LLM categorization. Few-shot intent prompt
Few-shot intent prompt Prompt with fewer than 10 examples that maps user search queries to predefined classes. LLM API classifier, Intent feature output
LLM API classifier LLM API used as an inference-time text intent classifier without fine-tuning. Few-shot intent prompt, Intent feature output
Intent feature output Categorical features used by Canva's content/search categorization systems. Downstream categorization
Content page corpus Pages with varied metadata lengths and content types that need semantic grouping. LLM embedding extractor
LLM embedding extractor Embeds plain page text directly into a semantic space. Content page corpus, Clustering evaluator
Clustering evaluator Evaluates balance, completion, and coherence for grouped pages. LLM embedding extractor, Downstream categorization
Downstream categorization Search and content systems consuming intent and clustering features. Intent feature output, Clustering evaluator

Data flow

Aggregated search queries or content pages enter the feature-extraction workflow. For query categorization, a few-shot prompt maps text to predefined classes through an LLM API. For content pages, raw text is embedded directly with LLM embeddings, then grouped by semantic similarity into topic clusters. The outputs feed downstream categorization and discovery systems.

3 supporting quotes
“with Airlines API as text intense classifier we only need to collect a handful of examples under 10 examples”transcript, stated
“at inference time we could use field short learning with a few examples that we've lost previously”transcript, stated
“llm embeddings on Plain page text without any text feature transformation gives the best outcome”transcript, stated

Why this architecture

The LLM-as-feature-extractor approach reduced training/deployment overhead and unified scattered text transformation pipelines while improving operational metrics for straightforward text tasks.

3 supporting quotes
“this process is much more simplified no training and deployment infra setup and with a much smaller annotated data set”transcript, stated
“variations of our content Pages increased we thought it would be worth evaluating llms for this task and see if it can simplify the feature extraction steps all at once”transcript, stated
“llms based on feature extraction can be operationally optimal especially for Rapid solution productionization”transcript, stated

Models used: LLM APIs · few-shot learning · LLM embeddings · open-source embeddings · sentence-transformers · BERT embeddings · single-purpose text intent classifier

Scale

Alternatives considered (roads not taken)

Single-purpose text intent classifier

Rejected because: It required large labeled data, training infrastructure, deployment infrastructure, four weeks of development, and higher monthly cost.

“collect a large amount of label data tens of thousands of data points and set up the training infrastructure”transcript, stated
“the single purpose intense classifier it costs about 100 per month”transcript, stated

Multi-step traditional NLP feature extraction for content pages

Rejected because: The pipeline required scattered keyword extraction, summarization, keypoint extraction, and embedding methods.

“this feature extraction requires different methods and Frameworks and libraries as I mentioned which is a pretty you know scattered”transcript, stated

External LLM API at full raw query volume

Rejected because: For millions-per-day scale, Canva reduced volume through aggregation or considered open-source LLM infrastructure to control external API cost.

“our search queries are also at you know at the magnitude of like Millions per day however we are able to kind of do an aggregation”transcript, stated
“look into the um open source LMS and see how to utilize it within you know your infrastructure”transcript, stated

Patterns

semantic-caching (cost-control)

Canva aggregated high-volume search queries before LLM processing so repeated or grouped query patterns could be categorized at lower volume.

“what we did to customer minimize or like reduce the actual volume of the data is to do the aggregation if possible”transcript, stated

eval-driven-development (evaluation)

The team compared feature extraction approaches with development time, cost, accuracy, balance, completion, and coherence metrics.

“we Define three metrics to evaluate the performance of this task balance to indicate how even the pages are grouped”transcript, stated
“we evaluated LMS as a feature extraction method to understand its operational performance better”transcript, stated

Tradeoffs

Use LLM APIs for straightforward text intent classification.

Chose Few-shot inference over Training a bespoke classifier.

Rationale: The LLM path cut development time and operating cost while improving accuracy in the case study.

“it significantly shortened the development process and timeline especially for straightforward tasks”transcript, stated
“from an accuracy perspective llm's apis is higher um than the single purpose intent classified”transcript, stated

Aggregate high-volume queries before LLM processing.

Chose Preprocessing and aggregation over Running the LLM on every raw query.

Rationale: Aggregation reduces millions-per-day query volume before downstream LLM feature extraction.

“do some a little bit of a hair lifting work to kind of like um group them aggregate them together to reduce the volume”transcript, stated

Gotchas (what bit them)

A simple classifier still carried a full ML lifecycle burden.

Root cause: Traditional text intent classification required labels, training infrastructure, inference development, and deployment.

Resolution: Use few-shot LLM APIs where predefined classes and straightforward text tasks made fine-tuning unnecessary.

“it requires the full development workflow including to collect a large amount of label data tens of thousands of data points”transcript, stated
“no training and deployment infra setup and with a much smaller annotated data set”transcript, stated

Content-page text variation made hand-built feature extraction brittle.

Root cause: Pages ranged from short metadata to long-form articles and required multiple NLP transformation methods.

Resolution: Embed plain page text directly with LLM embeddings and cluster in semantic space.

“contents pages of various characteristics from the pages within a collection of similar templates with short form metadata text to an informational articles with long form texts”transcript, stated
“llm embeddings on Plain page text without any text feature transformation gives the best outcome”transcript, stated

Evaluation

Canva evaluated query categorization with development time, operating cost, scale, and accuracy; content page categorization with balance, completion, and coherence.

Metrics: development time · operational cost · weekly scheduled job inputs · accuracy · balance · completion · coherence

3 supporting quotes
“in terms of operation cost for the single purpose intense classifier it costs about 100 per month”transcript, stated
“completion indicate the percentage of these pages in scope are grouped into relevant topics or classes”transcript, stated
“coherence as the way um that the pages grouped together is coherent and sensible”transcript, stated

Outcomes

The query job ran weekly over hundreds of thousands of inputs, while raw query volume could be millions per day before aggregation.

3 supporting quotes
“well it took about a week to achieve the same task using lm's apis”transcript, stated
“the LMS apis is roughly less than five dollars per month in our case study”transcript, stated
“it grouped 89 of the pages into relevant categories which is the highest among all the other methods”transcript, stated