Skip to content

Command ranking using both commands and titles #14

@forrestbao

Description

@forrestbao

Previously we only match commands with queries. Now we can extract command titles, so we should leverage both.

  1. Storing the embeddings of both commands and title. We will use three objects:
    • List[str], the commands themselves
    • 2D numpy.ndarray[float] the embeddings of the command phrases, one row per command,
    • 2D numpy.ndarray[float] the embeddings of the command titles, one row per command.
      The three objects shall have the same length, which equals to the number of commands provided by VSCode and installed plug-ins.
  2. Matching a query. Denote the similarity measure function as $d$, the embedding of the query as $e_q$, and the embedding of a command as $e_c$, and the embedding of the command's title as $e_t$. Then the similarity of the query and the command is $max(d(e_q, e_c), d(e_q, e_t))$ -- tentatively set so. We can use other heuristics later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions