intelligence

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package intelligence extracts lightweight skill and role signals from resumes and job descriptions.

Index

Constants

View Source
const (
	InboxKindConfirmation = "confirmation"
	InboxKindInterview    = "interview"
	InboxKindRejection    = "rejection"
	InboxKindOffer        = "offer"
	InboxKindUnrelated    = "unrelated"
)

Inbox classification kinds. Anything not matched here is treated as "unrelated" by the CLI (no action proposed).

Variables

This section is empty.

Functions

func ClassifySeniority

func ClassifySeniority(text string) string

ClassifySeniority returns junior, mid, senior, lead, or an empty string when no reliable signal is present. More specific senior signals win over broad mid-level wording.

func ComputeSkillMatches

func ComputeSkillMatches(resume ResumeProfile, job JobProfile) []string

ComputeSkillMatches returns normalized skills detected in both profiles.

Types

type InboxClassification

type InboxClassification struct {
	Kind      string
	JobID     string
	Rationale string
}

InboxClassification is one LLM-produced verdict for one email. JobID is empty when Kind == unrelated, or when the model can't match the email to any tracked job (we never invent IDs).

func ClassifyMessage

func ClassifyMessage(ctx context.Context, client llm.Client, prof profile.Profile, jobs []job.Job, subject, from, body string) (InboxClassification, error)

ClassifyMessage asks the configured LLM to classify one email and match it to a tracked job. Subject/from/body are passed as primitives so this package doesn't gain a dep on internal/inbox.

type JobProfile

type JobProfile struct {
	Skills    []string
	Keywords  []string
	Seniority string
}

JobProfile is a normalized, heuristic summary of a job description.

func ExtractJobProfile

func ExtractJobProfile(description string) JobProfile

ExtractJobProfile extracts skills, keywords, and seniority from a job description or title plus description string.

type MatchResult

type MatchResult struct {
	JobID     string
	Score     int
	Rationale string
}

MatchResult is the fit score the LLM produced for one job. Score is 0-100 where 100 means "perfect fit." Rationale is one short sentence from the model. JobID matches the input job's ID so callers can write the result back to the right record.

func RankJobs

func RankJobs(ctx context.Context, client llm.Client, prof profile.Profile, resumeSnippet string, jobs []job.Job) ([]MatchResult, error)

RankJobs scores each input job against the user's profile + resume. Returns one MatchResult per input job in input order. If the LLM skipped a job, that slot gets a zero score and a placeholder rationale. Returns an error if the client is Noop (we can't rank without a real model) or any batch call fails.

type ResumeProfile

type ResumeProfile struct {
	Skills      []string
	RoleSignals []string
	Keywords    []string
}

ResumeProfile is a normalized, heuristic summary of resume content.

func ExtractResumeProfile

func ExtractResumeProfile(text string) ResumeProfile

ExtractResumeProfile extracts skills, role signals, and keywords from resume-like text. It intentionally uses lightweight local heuristics only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL