holistics/anfra-skills

anfra-lookup-values

Verify the exact stored values of a field before filtering on them, guarding against case sensitivity, abbreviations, and typos.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/holistics/anfra-skills --skill anfra-lookup-values

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Verifying field values before filtering

Before you filter on a value, confirm it actually exists in the data in that exact form. Filtering on a guessed literal ("Second-hand", "male", "VN") silently returns wrong or empty results when the stored form differs.

When to use

  • Any filter on a dimension whose exact stored values you haven't confirmed.
  • Especially categorical / text fields — and even "obvious" ones (a gender

column can still hold unexpected values like "f", "m", "F", "M").

How

  1. Identify the field(s) most likely to carry the concept (check field names,

labels, descriptions). Go from the most likely first.

  1. List the distinct values, narrowing with a case-insensitive

where(... ilike ...) filter. Batch 2–3 candidate patterns in a single query (joined with or) to go faster.

  1. Once you've identified the exact value(s), proceed to the real query. Don't

keep using lookups to compute the answer — write the AQL.

Command (swappable per scenario)

Default (Anfra) — unique() lists a dimension's distinct values; add a case-insensitive where(<model>.<field> ilike '%pattern%') to probe candidates, batching several patterns with or:

sh
# distinct values of a (small) column
anfra query --dataset <uname> 'unique(products.type)'

# batch 2–3 candidate patterns for "second-hand" in one query
anfra query --dataset <uname> "unique(products.type) | where(products.type ilike '%second%' or products.type ilike '%sh%' or products.type ilike '%used%')"
Replace this command for other runtimes if needed. The guidance above is stable; only the command changes.

If nothing matches

If you can't find the concept in any field, ask the user to clarify rather than guessing a value.


anfra skills 0.21.0

같은 저장소의 Skills

더 많은 Skills

모든 Skills