header wave

Post

Prompt Engineering

2024-04-21 PM 03/07
#study

Linguistic : 언어학

Understanding the nuances of language and how it is used in different contexts is crucial for crafting effective prompts.

→ 학습된 모델들이 언어학을 기본 골자로 학습되었기 때문에 언어학 이론에 맞춰 질문하면 더욱 디테일한 답변을 얻을 수 있음

Language Modal: 언어모델

문장을 입력했을 때 언어 모델이 문장을 분석하고, 단어의 의미와 단어의 순서를 검사하고, 단어가 서로 어울리는 방식을 검사한 다음 언어 모델이 예측 또는 연속성있는 답변을 생성한다.

Prompt Engineering : 최적화된 질문으로 원하는 질문을 빠르게 얻는다.

좋은 질문을 만들기 위해서는?

  1. Clear Instructions

  2. Adopt a persona

  3. Specify the format

  4. Avoid leading the answer

  5. Limit the scope

Text Embedding

In computer science, particularly in the realm of machine learning and natural language processing (NLP), text embedding is popular technique to represent textual information in a format that can be easily processed by algorithms, especially deep learning models.

→ 임베딩은 특정한 데이터 유형의 벡터 표현이다. 임베딩은 복잡한 구조를 숫자의 벡터로 변환하여 기계가 데이터를 이해하고 처리할 수 있도록 만드는 역할을 한다.

example

# 단어 임베딩의 간단한 예시

word_embeddings = {
    'king': [0.1, 0.3, 0.4],
    'queen

': [0.1, 0.3, 0.39],
    'man': [0.2, 0.33, 0.42],
    'woman': [0.2, 0.34, 0.42]
}