JEV가 단순 임베딩 모델과 뭐가 다른지 설명해 줄 사람?
Can someone explain how JEV is different from a simple embeddings model?
핵심 요약
JEV와 단순 임베딩 모델의 차이점에 대한 기술적 논의와 회의적인 시각이 공존하는 포스트입니다.
- 기술적 차이 — 임베딩 모델은 단순 유사도 측정에 그치지만 JEV는 의도 파악과 확률적 분류에 최적화됨
- 마케팅 논란 — 기존의 제로샷 분류 기술을 화려한 이름으로 포장해 판매하려는 상술이라는 비판 존재
- 성능 한계 — 프롬프트 인젝션 탐지 등 복잡한 상황에서는 임베딩 모델의 한계가 명확함
- 유행의 덧없음 — 인플루언서 마케팅에 의한 과도한 과대광고일 뿐이라는 의견이 지배적임
JEV가 임베딩 모델 쓰는 거랑 도대체 뭐가 다른 거냐? 누가 좀 설명 좀 해줘라. 아무리 봐도 차이점을 모르겠거든.
내 JEV 서버 그냥 공짜로 줄게! ollama 쓰니까 ollama pull nomic-embed-text:latest 해서 설치해 봐라.
% python3 ./jev_embedding.py "How high is the sky?"
find_phone: 0.38
volume: 0.41
calendar: 0.44
tell_the_time: 0.49
weather: 0.53
% python3 ./jev_embedding.py "I had this thing on my anus. The doctor burned it off with a laser."
weather: 0.35
tell_the_time: 0.36
calendar: 0.37
volume: 0.38
find_phone: 0.43
% python3 ./jev_embedding.py "can you help me locate my phone."
volume: 0.38
weather: 0.40
calendar: 0.43
tell_the_time: 0.53
find_phone: 0.89
% python3 ./jev_embedding.py "Hello Cleveland! I can't HEAR you"
weather: 0.37
calendar: 0.40
tell_the_time: 0.44
find_phone: 0
volume: 0.56
#!/usr/bin/env python3
"""
jev_embedding.py — minimal showcase of the embedding-based intent router,
excised from jarvis_workflow.py.
Given a phrase on the command line, it embeds the phrase and every example
utterance (via the local Ollama embedding model), then prints the cosine
similarity of the phrase to each intent — the raw routing signal — instead of
running a handler and speaking an answer.
python3 jev\_embedding.py "How high is the sky?"
"""
import sys
import requests
--- Config (same endpoint/model as jarvis_workflow.py) ---
OLLAMA_EMBED_URL = "http://localhost:11434/api/embeddings"
INTENT_EMBED_MODEL = "nomic-embed-text"
--- The five cases to detect ---
label -> example utterances, matched by similarity.
INTENTS = {
"volume": [
"turn the volume up",
"make it quieter",
"set the volume to seven",
],
"tell_the_time": [
"what time is it",
"can you tell me the time",
],
"weather": [
"how's the weather going to be today",
"will it rain today",
"do I need a raincoat",
],
"find_phone": [
"find my phone",
"where's my phone",
"ring my phone",
],
"calendar": [
"when is my next meeting",
"what's coming up on the calendar tomorrow",
],
}
def _embed(text):
"""Return a unit-normalised embedding (list of floats) from the Ollama model."""
r = requests.post(OLLAMA_EMBED_URL,
json={"model": INTENT_EMBED_MODEL, "prompt": text},
timeout=10)
vec = r.json().get("embedding")
if not vec:
raise RuntimeError("no embedding returned")
norm = (sum(x * x for x in vec)) ** 0.5 or 1.0
return [x / norm for x in vec]
