기술 및 지식 YAML 파일 생성


Red Hat Enterprise Linux AI 1.5

기술 및 지식 YAML 파일 생성에 대한 지침

Red Hat RHEL AI Documentation Team

초록

이 문서에서는 모델 교육을 위해 기술 및 지식 YAML 데이터 파일을 생성하는 방법에 대한 지침을 제공합니다.

1장. taxonomy 트리 사용자 정의

RHEL AI 환경에서 지식 또는 기술 데이터로 taxonomy 트리를 수정하여 자체 사용자 지정 Granite Large Language Model(LLM)을 생성할 수 있습니다. RHEL AI에서 데이터 세트 생성 지식 및 기술은 YAML로 포맷됩니다. 이 YAML 구성을 qna.yaml 파일이라고 합니다. 여기서 "qna"는 질문 및 응답을 나타냅니다. taxonomy 트리는 qna.yaml 파일을 보유하는 분류 및 정보 분류 방법입니다.

다음 문서 섹션에서는 taxonomy 트리에 대한 기술 및 지식 qna.yaml 파일을 생성하는 방법을 설명합니다.

Starter Granite Cryostat를 교육하는 데 사용할 수 있는 몇 가지 지식 문서 유형이 있습니다. 현재 지원되는 문서 유형은 다음과 같습니다.

  • Markdown
  • PDF

1.1. 기술 및 지식 개요

기술 및 지식 세트를 사용하고 도메인별 정보를 지정하여 사용자 지정 모델을 알릴 수 있습니다.

지식
정보 및 사실로 구성된 데이터 세트입니다. 모델에 대한 지식 데이터를 생성할 때 추가 데이터 및 정보를 제공하여 모델이 질문에 보다 정확하게 응답할 수 있도록 합니다.
기술

작업을 수행하는 방법을 모델을 알릴 수 있는 데이터 세트입니다. RHEL AI에 대한 기술은 카테고리로 나뉩니다.

  • 구성 기술: 가정 기술을 통해 AI 모델이 특정 작업 또는 기능을 수행할 수 있습니다. 구성 기술은 다음 두 가지 유형이 있습니다.

    • Freeform 구성 기술: 기능에 추가 컨텍스트 또는 정보가 필요하지 않은 수행 기술입니다.
    • 기본 구성 기술: 이는 추가 컨텍스트가 필요한 수행 기술입니다. 예를 들어 모델에게 테이블을 읽도록 유도할 수 있습니다. 여기서 추가 컨텍스트는 테이블 레이아웃의 예입니다.
  • Foundation Technology: Foundational 기술은 math, reasoning 및 coding을 포함하는 기술입니다.

추가 리소스

2장. taxonomy 트리에 대한 지식 추가

세로미 트리를 사용자 지정할 수 있으므로 모델이 도메인별 정보를 배울 수 있습니다. RHEL AI의 경우 지식 데이터는 Git 리포지토리에서 호스팅됩니다. 지식 기여는 qna.yaml 파일을 사용하여 모델을 학습하려는 문서를 읽는 방법을 알아봅니다. 지식을 위한 각 qna.yaml 파일에는 다음 키가 있는 키-값 항목 세트가 포함되어 있습니다.

Expand
표 2.1. Red Hat Enterprise Linux AI
필드설명Constraints

version

qna.yaml 파일에 사용되는 taxonomy 스키마 버전입니다.

이 매개변수에 현재 지원되는 값은 3 입니다.

3

created_by

기여자의 이름 또는 사용자 이름입니다.

-

Kbrown

domain

지식 문서의 제목 또는 범주입니다. 도메인은 합성 데이터 생성 중에 마스터 모델에 메시지를 표시하고 추가 컨텍스트를 추가합니다.

도메인 필드는 3단어를 넘지 않는 것이 좋습니다.

토론에 대한 지식 문서의 경우, 도메인은 Astronomy.

건강 보험 정보에 대한 지식 문서의 경우 도메인은 입니다.

seed_examples

기술 문서에서 컨텍스트와 함께 질문 및 응답 쌍을 포함하는 필드입니다.

qna.yaml 파일에 최소 5개의 시드 예제가 필요합니다.

seed_examples:
  - context:
    questions_and_answers:

context

지식 문서에서 정확히 가져온 정보 청크입니다. 마스터 모델을 안내하는 데 도움이 되도록 표, 단락 또는 목록을 포함하여 다양한 유형의 콘텐츠를 강조 표시합니다.

각 qna.yaml에는 5개의 컨텍스트 블록이 필요하며 최대 500개의 토큰 수가 있습니다.

is a minor constellation in the southern Sky. mythical Cryostat_(mythology)에 따라 이름이 지정되었으며, Johann Cryostaterin의 1603 Uranometria에 의해 11elestial atlas에 처음 표시되었습니다. French Explorer와 astronomer Nicolas Louis de Lacaille은 더 뛰어난 별을 차지하여 1756년의 Designation을 제공했습니다.

questions_and_answers

모델이 학습할 수 있는 질문 및 응답이 포함된 필드입니다.

qna.yaml 에는 컨텍스트 블록당 세 개의 질문 및 응답 쌍이 필요합니다.

questions_and_answers:
  - question:
    answer:

질문

관련 컨텍스트와 관련이 있고 접지된 질문입니다. 사실 기반, 추론 또는 설명을 포함하여 다양한 질문 및 질문 유형을 제공합니다.

최대 250개의 토큰 수입니다.

누가 별자리를 보고 있습니까?

응답

지정된 질문에 대한 응답입니다. 답변은 완전한 문장이어야 하며 context 필드에서 참조해야 합니다.

최대 250개의 토큰 수입니다.

The Cryostat constellation은 f French explorer 및 astronomer Nicolas Louis de Lacaille에 의해 차트되었습니다.

document_outline

문서에 대한 간략한 요약은 Thesis 문과 유사합니다. 이는 문서 콘텐츠에 대한 높은 수준의 컨텍스트를 제공합니다.

자세한 내용이어야 하며 context 필드의 콘텐츠를 참조해야 합니다.

별자리에 있는 별의 기록, 특성 및 특징을 포함한 Constellation에 대한 정보

문서

기술 자료의 출처가 포함된 필드입니다.

-

document:
   repo:
   commit:
   patterns:

리포지토리

기술 자료 파일이 포함된 Git 리포지토리의 URL입니다.

-

github.com/<profile>/<repo-name>

커밋

리포지토리의 문서에 해당하는 전체 커밋 해시

-

-

패턴

Git 리포지토리에 파일을 포함

유효한 값에는 .md 또는 .pdf 가 포함됩니다.

phoenix_constellation.md

qna.yaml을 생성하기 위한 추가 리소스

2.1. 지식 YAML 파일 생성

다음 프로세스는 RHEL AI 툴셋을 사용하여 제공된 기술 파일에 대해 교육하는 qna.yaml 파일을 생성하는 방법을 보여줍니다.

사전 요구 사항

  • 부팅 가능한 컨테이너 이미지를 사용하여 RHEL AI를 설치했습니다.
  • git CLI를 설치했습니다.
  • InstructLab을 초기화하고 ilab CLI를 사용할 수 있습니다.
  • 시스템에서 root 사용자 액세스 권한이 있어야 합니다.

프로세스

  1. Git 리포지토리에서 지식 파일을 호스팅하므로 과세 기간을 업데이트할 때 작업 분기를 체크아웃해야 합니다.
  2. taxonomy 폴더로 이동합니다. RHEL AI에는 상호 작용할 준비가 된 taxonomy 트리가 포함되어 있습니다.
  3. taxonomy 디렉터리의 지식 폴더로 이동합니다.
  4. 기술 자료 qna.yaml 파일을 추가할 taxonomy 트리에 디렉터리와 폴더를 추가합니다.

    taxonomy 트리의 파일 경로 예

    taxonomy/knowledge/technical_documents/product_customer_cases/qna.yaml

  5. 원하는 텍스트 편집기를 사용하여 qna.yaml 파일을 생성합니다. YAML에는 qna.yaml 제목이 있어야 합니다.

    참고

    SDG가 제대로 작동하려면 컨텍스트 청크를 5개 이상 포함하고 질문 _and_answers 매개변수의 컨텍스트 값에 따라 약 3개의 질문이 포함되어야 합니다.

  6. qna.yaml 파일에 필요한 키를 추가하고 변경 사항을 저장합니다. qna.yaml 파일 포맷에 대한 자세한 내용은 "Sample knowledge YAML specifications"을 참조하십시오.

검증

  • 지식 qna.yaml 파일이 적절한 형식인지 확인하려면 다음 명령을 실행합니다.

    $ ilab taxonomy diff

    CLI는 taxonomy 트리 및 qna.yaml 파일이 유효하고 올바르게 포맷된 경우 표시됩니다. CLI에는 오류가 발생하는 모든 문제를 수정할 수 있는 위치도 표시됩니다.

    유효한 taxonomy 트리 및 qna.yaml 파일의 출력 예

    knowledge/technical_documents/product_customer_cases/qna.yaml
    Taxonomy in /taxonomy/ is valid :)

    오류가 있는 잘못된 taxonomy 트리 및 qna.yaml 파일의 출력 예

    9:15 error syntax error: mapping values are not allowed here (syntax)
    Reading taxonomy failed with the following error: 1 taxonomy with errors! Exiting.

2.1.1. 샘플 지식 YAML 사양

지식 기여는 qna.yaml 파일을 사용하여 모델을 학습하려는 문서를 읽는 방법을 알아봅니다. RHEL AI에서 합성 데이터 생성(SDG) 프로세스는 qna.yaml 시드 예제를 사용하여 많은 양의 인공 데이터를 생성합니다. 이 프로세스를 통해 모델은 제공된 샘플에 독점적으로 의존하는 대신 더 많은 데이터를 학습할 수 있습니다.

기술 자료 qna.yaml 파일 예

version: 3 
1

domain: astronomy 
2

document_outline: | 
3

  Information about the Phoenix Constellation including the
  history, characteristics, and features of the stars in the constellation.
created_by: <user-name> 
4

seed_examples:
  - context: | 
5

      **Phoenix** is a minor constellation in the southern sky. Named after the mythical
      Phoenix_(mythology), it was first depicted on a celestial atlas by Johann Bayerin his 1603
      Uranometria. The French explorer and astronomer Nicolas Louis de Lacaille charted the brighter stars
      and gave their Bayer designations in 1756. The constellation stretches from roughly −39 degrees to −57
      degrees declination, and from 23.5h to 2.5h of right ascension. The constellations Phoenix, Grus,
      Pavo and Tucana are known as the Southern Birds.
    questions_and_answers:
      - question: | 
6

          What is the Phoenix constellation?
        answer: | 
7

         The Phoenix constellation is a minor constellation in the southern sky.
      - question: |
          Who charted the Phoenix constellation?
        answer: |
          The Phoenix constellation was charted by french explorer and
          astronomer Nicolas Louis de Lacaille.
      - question: |
          How far does the Phoenix constellation stretch?
        answer: |
          The phoenix constellation stretches from roughly −39° to −57°
          declination, and from 23.5h to 2.5h of right ascension.
  - context: |
      Phoenix was the largest of the 12 constellations established by Petrus Plancius from the observations
      of Pieter Dirkszoon Keyser and Frederick de Houtman. It first appeared on a 35cm diameter celestial globe
      published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius. The first depiction of this
      constellation in a celestial atlas was in Johann Bayer *Uranometria* of 1603. De Houtman included it in
      his southern star catalog the same year under the Dutch name *Den voghel Fenicx*, "The Bird Phoenix",
      symbolising the phoenix of classical mythology. One name of the brightest star Alpha Phoenicis—Ankaa—is
      derived from the Arabic: العنقاء, romanized: al-‘anqā’, lit. 'the phoenix', and was coined sometime after
      1800 in relation to the constellation.
    questions_and_answers:
      - question: |
          What is the brightest star in the Phoenix constellation
          called?
        answer: |
          Alpha Phoenicis or Ankaa is the brightest star in the Phoenix
          Constellation.
      - question: Where did the Phoenix constellation first appear?
        answer: |
          The Phoenix constellation first appeared on a 35-cm diameter
          celestial globe published in 1597 (or 1598) in Amsterdam by
          Plancius with Jodocus Hondius.
      - question: |
          What does "The Bird Phoenix" symbolize?
        answer: |
          "The Bird Phoenix" symbolizes the phoenix of classical mythology.
  - context: |
      Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west,
      Tucana to the south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast.
      The bright star Achernar is nearby. The three-letter abbreviation for the constellation, as adopted by
      the International Astronomical Union in 1922, is "Phe". The official constellation boundaries,
      as set by Belgian astronomer Eugène Delporte in 1930, are defined by a polygon of 10 segments.
      In the equatorial coordinate system, the right ascension coordinates of these borders lie
      between 23<sup>h</sup> 26.5<sup>m</sup> and 02<sup>h</sup> 25.0<sup>m</sup>,
      while the declination coordinates are between −39.31° and −57.84°. This means it remains
      below the horizon to anyone living north of the 40th parallel in the Northern
      Hemisphere, and remains low in the sky for anyone living north of the equator. It is most
      visible from locations such as Australia and South Africa during late Southern Hemisphere spring.
      Most of the constellation lies within, and can be located by, forming a triangle of the bright
      stars Achernar, Fomalhaut and Beta Ceti—Ankaa lies roughly in the centre of this.
    questions_and_answers:
      - question: What are the characteristics of the Phoenix constellation?
        answer: |
          Phoenix is a small constellation bordered by Fornax and Sculptor to
          the north, Grus to the west, Tucana to the south, touching on the
          corner of Hydrus to the south, and Eridanus to the east and southeast.
          The bright star Achernar is nearby.
      - question: |
          When is the phoenix constellation most visible?
        answer: |
          Phoenix is most visible from locations such as Australia and
          South Africa during late Southern Hemisphere spring.
      - question: |
          What are the Phoenix Constellation boundaries?
        answer: |
          The official constellation boundaries for Phoenix, as set by Belgian
          astronomer Eugène Delporte in 1930, are defined by a polygon of 10
          segments.
  - context: |
      Ten stars have been found to have planets to date, and four planetary systems have been
      discovered with the SuperWASP project. HD 142 is a yellow giant that has an apparent magnitude
      of 5.7, and has a planet (HD 142b) 1.36 times the mass of Jupiter which orbits every 328 days.
      HD 2039 is a yellow subgiant with an apparent magnitude of 9.0 around 330 light years away which
      has a planet (HD 2039) six times the mass of Jupiter. WASP-18 is a star of magnitude 9.29 which
      was discovered to have a hot Jupiter-like planet (WASP-18b) taking less than a day to orbit the star.
      The planet is suspected to be causing WASP-18 to appear older than it really is. WASP-4and WASP-5
      are solar-type yellow stars around 1000 light years distant and of 13th magnitude, each with a single
      planet larger than Jupiter. WASP-29 is an orange dwarf of spectral type K4V and visual magnitude 11.3,
      which has a planetary companion of similar size and mass to Saturn. The planet completes an orbit
      every 3.9 days.
    questions_and_answers:
      - question: In the Phoenix constellation, how many stars have planets?
        answer: |
          In the Phoenix constellation, ten stars have been found to have
          planets to date, and four planetary systems have been discovered
          with the SuperWASP project.
      - question: |
          What is HD 142?
        answer: |
          HD 142 is a yellow giant that has an apparent magnitude of 5.7, and
          has a planet (HD 142 b) 1.36 times the mass of Jupiter which
          orbits every 328 days.
      - question: |
          Are WASP-4 and WASP-5 solar-type yellow stars?
        answer: |
          Yes, WASP-4 and WASP-5 are solar-type yellow stars around 1000 light
          years distant and of 13th magnitude, each with a single planet
          larger than Jupiter.
  - context: |
      The constellation does not lie on the galactic plane of the Milky Way, and there are no prominent star
      clusters. NGC 625 is a dwarf irregular galaxy of apparent magnitude 11.0 and lying some 12.7 million
      light years distant. Only 24000 light years in diameter, it is an outlying member of the Sculptor Group.
      NGC 625 is thought to have been involved in a collision and is experiencing a burst of active star formation.
      NGC 37 is a lenticular galaxy of apparent magnitude 14.66. It is approximately 42 kiloparsecs 137,000
      light-years in diameter and about 12.9 billion years old. Robert's Quartet composed of the irregular galaxy
      NGC 87, and three spiral galaxies NGC 88, NGC 89 and NGC 92 is a group of four galaxies located around 160 million
      light-years away which are in the process of colliding and merging. They are within a circle of radius of 1.6 arcmin,
      corresponding to about 75,000 light-years. Located in the galaxy ESO 243-49 is HLX-1, an intermediate-mass
      black hole—the first one of its kind identified. It is thought to be a remnant of a dwarf galaxy that was absorbed
      in a collision with ESO 243-49. Before its discovery, this class of black hole was only hypothesized.
    questions_and_answers:
      - question: |
          Is the Phoenix Constellation part of the Milky Way?
        answer: |
          The Phoenix constellation does not lie on the galactic plane of
          the Milky Way, and there are no prominent star clusters.
      - question: |
          How many light years away is NGC 625?
        answer: |
          NGC 625 is 24000 light years in diameter and is an outlying
          member of the Sculptor Group.
      - question: |
          What is Robert's Quartet composed of?
        answer: |
          Robert's Quartet is composed of the irregular galaxy NGC 87,
          and three spiral galaxies NGC 88, NGC 89 and NGC 92.
document:
  repo: https://github.com/<profile>/<repo-name> /
8

  commit: <commit hash> 
9

  patterns:
  - phoenix_constellation.md 
10

  - phoenix_history.md

1
기술 자료 qna.yaml 형식의 버전을 지정합니다. 현재 유효한 값은 3 입니다.
2
문서의 제목 또는 범주를 지정합니다. 예를 들어 "기술 문서" 또는 "설치 가이드"입니다.
3
문서의 콘텐츠에 대한 개요를 지정합니다. document_outline 필드의 context 매개 변수에 포함하는 주체를 참조하는 것이 좋습니다. 예를 들어 문서가 설치 가이드이고 각 컨텍스트에 다른 클라우드 공급자에 대한 세부 정보가 포함된 경우 document_outline 은 "AWS, GCP 및 Azure 설치 가이드"가 됩니다.
4
이름 또는 git 사용자 이름을 지정합니다.
5
기술 자료 단락을 지정합니다. 이는 귀하의 질문 및 답변을 기반으로 하는 내용입니다. 컨텍스트 블록 형식은 기술 자료 파일의 형식과 일치해야 합니다. 예를 들어 기술 문서가 마크다운에 있는 경우 컨텍스트 블록도 마크다운 형식이어야 합니다.
6
모델에 대한 질문을 지정합니다. 문제는 컨텍스트 필드의 정보를 기반으로 해야 합니다. 예를 들어 "제품의 최신 버전은 무엇입니까?".
7
모델에서 원하는 응답을 지정합니다. 답변에 대한 정보는 컨텍스트 블록에서 포함하되 복사되지 않아야 하며 완전한 문장이어야 합니다. 답변은 완전한 문장이어야 합니다. 예를 들어 "제품의 최신 버전은 버전 1.5"입니다.
8
기술 자료 파일이 포함된 리포지토리의 URL을 지정합니다.
9
기술 파일의 git 리포지토리에서 커밋의 SHA를 지정합니다.
10
git 리포지토리에 문서를 지정합니다. 유효한 문서 유형 값에는 .md 또는 .pdf 가 포함됩니다. 단일 qna.yaml 파일은 하나의 문서 유형만 참조할 수 있으며 동일한 qna.yaml 내의 파일 유형을 혼합하는 것은 지원되지 않습니다.

2.2. 지식 마크다운 파일 만들기

Red Hat Enterprise Linux AI 버전 1.5에서는 지식 문서 및 데이터를 Git 리포지토리 및 마크다운 형식으로 호스팅해야 합니다. 표준 git 워크플로를 사용하여 리포지터리에 파일을 생성하고 업로드할 수 있습니다. 다음을 포함하여 사용할 수 있는 다양한 오픈 소스 마크다운 변환 도구가 있습니다.

  • Pandoc: 오픈 소스 변환 툴.
  • 하나의 범위에서 Visual Studio Code를 사용하여 Visual Studio Code: You can open your document in Visual Studio Code, and use the Markdown All in One extensions to convert to Markdown.
  • IBM Deepsearch/Docling: 번들 PDF 문서를 JSON으로 변환하고 자체 포함 패키지의 마크다운으로 변환합니다.

프로세스

  1. 선호하는 git 호스팅 플랫폼을 선택합니다. git과 호환되는 한 RHEL AI에서 모든 플랫폼을 사용할 수 있습니다.
  2. 문서를 .md 마크다운 형식으로 변환합니다. 지식 데이터에 원하는 마크다운 변환 소프트웨어를 사용할 수 있습니다.

    다음 목록에는 지식 마크다운 파일에 대한 지침이 포함되어 있습니다.

    • 모든 문서는 텍스트여야 하며 이미지는 현재 지원되지 않습니다.
    • 문서에서 모든 발주를 제거하십시오.
    • 테이블은 마크다운 형식이어야 합니다.
    • 현재 차트와 그래프는 지원되지 않습니다.
  3. 파일 이름과 커밋 해시를 기록해 둡니다. 이 값은 qna.yaml 파일에서 사용됩니다.
  4. md 파일을 생성하고 Git 리포지토리에 업로드합니다.

    기술 문서의 마크다운 예

    # Phoenix (constellation)
    
    **Phoenix** is a minor constellation in the southern sky. Named after the mythical phoenix,
    it was first depicted on a celestial atlas by Johann Bayer in his 1603 *Uranometria*. The
    French explorer and astronomer Nicolas Louis de Lacaille charted the brighter stars and gave
    their Bayer designations in 1756. The constellation stretches from roughly −39 degrees to −57
    degrees declination, and from 23.5h to 2.5h of right ascension. The constellations Phoenix,
    Grus , Pavo and Tucana, are known as the Southern Birds.
    
    The brightest star, Alpha Phoenicis, is named Ankaa, an Arabic word meaning 'the Phoenix'.
    It is an orange giant of apparent magnitude 2.4. Next is Beta Phoenicis, actually a
    binary system composed of two yellow giants with a combined apparent magnitude of 3.3. Nu Phoenicis
    has a dust disk, while the constellation has ten star systems with known planets and the recently
    discovered galaxy clusters El Gordo and the Phoenix Cluster—located 7.2 and 5.7 billion light years
    away respectively, two of the largest objects in the visible universe. Phoenix is the radiant of
    two annual meteor showers: the Phoenicids in December, and the July Phoenicids.
    
    ## History
    
    Phoenix was the largest of the 12 constellations established by Petrus Plancius from the observations
    of Pieter Dirkszoon Keyser and Frederick de Houtman. It first appeared on a 35-cm diameter celestial
    globe published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius. The first
    depiction of this constellation in a celestial atlas was in Johann Bayer's*Uranometria* of 1603. De Houtman
    included it in his southern star catalog the same year under the Dutch name *Den voghel Fenicx*,
    "The Bird Phoenix", symbolizing the phoenix of classical mythology. One name of the brightest star Alpha
    Phoenicis—Ankaa—is derived from the Arabic: العنقاء, romanized: al-‘anqā’, lit. 'the phoenix', and was
    coined sometime after 1800 in relation to the constellation.
    
    Celestial historian Richard Allen noted that unlike the other constellations introduced by Plancius and La
    Caille, Phoenix has actual precedent in ancient astronomy, as the Arabs saw this formation as representing
    young ostriches, *Al Ri'āl*, or as a griffin or eagle. In addition, the same group of stars was sometimes
    imagined by the Arabs as a boat, *Al Zaurak*, on the nearby river Eridanus. He observed,
    "the introduction of a Phoenix into modern astronomy was, in a measure, by adoption rather than by invention."
    
    The Chinese incorporated Phoenix's brightest star, Ankaa (Alpha Phoenicis), and stars from the adjacent
    constellation Sculptor to depict *Bakui*, a net for catching birds. Phoenix and the neighboring constellation
    of Grus together were seen by Julius Schiller as portraying Aaron the High Priest. These two constellations,
    along with nearby Pavo and Tucana, are called the Southern Birds.
    
    ## Characteristics
    
    Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west, Tucana to the
    south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast. The bright star
    Achernar is nearby. The three-letter abbreviation for the constellation, as adopted by the International Astronomical
    Union in 1922, is "Phe". The official constellation boundaries, as set by Belgian astronomer Eugène Delporte in
    1930, are defined by a polygon of 10 segments. In the equatorial coordinate system, the right ascension
    coordinates of these borders lie between 23<sup>h</sup> 26.5<sup>m</sup> and 02<sup>h</sup> 25.0<sup>m</sup>, while
    the declination coordinates are between −39.31° and −57.84°. This means it remains below the horizon to anyone
    living north of the 40th parallel  in the Northern Hemisphere, and remains low in the sky for anyone living north
    of the equator. It is most visible from locations such as Australia and South Africa during late Southern Hemisphere spring.
    Most of the constellation lies within, and can be located by, forming a triangle of the bright stars Achernar,
    Fomalhaut and Beta Ceti—Ankaa lies roughly in the centre of this.

3장. taxonomy 트리에 기술 추가

시작 모델은 qna.yaml 파일을 도메인별 기술로 채워 사용자 지정 기술을 배울 수 있습니다. 기술에 대한 각 qna.yaml 파일에는 다음 키가 있는 키-값 항목 세트가 포함되어 있습니다.

Expand
표 3.1. Red Hat Enterprise Linux AI
필드Desciptionrestraints

version

qna.yaml 파일의 버전, SDG에 사용되는 파일의 형식입니다.

이 매개변수에 현재 지원되는 값은 2입니다.

created_by

Git 사용자 이름 또는 기여자 이름입니다.

없음

task_description

귀하의 기술과 기능에 대한 설명입니다.

없음

seed_examples

키 및 값 항목의 컬렉션입니다.

qna.yaml 파일에는 최소 5개의 시드 예제가 필요합니다.

context

접지된 기술은 사용자에게 모델이 기술을 실행하기 위해 알아야 하는 정보가 포함된 추가 컨텍스트를 제공해야 합니다.

이 파일은 접착된 기술을 위해 필요합니다. 각 qna.yaml 에는 5개의 컨텍스트 블록이 필요하며 최대 500개의 토큰 수가 있습니다.

질문

모델에 대한 질문을 지정합니다.

qna.yaml 파일에는 최소 5개의 질문 및 최대 토큰 수가 250개의 토큰이 있는 응답 쌍이 필요합니다.

응답

모델에 대한 답변을 지정합니다.

qna.yaml 파일에는 최소 5개의 질문 및 최대 토큰 수가 250개의 토큰이 있는 응답 쌍이 필요합니다.

3.1. 기술 YAML 파일 생성

taxonomy 트리를 사용자 지정할 수 있으므로 모델이 원하는 사용 사례에 대한 새로운 기술을 배울 수 있습니다. 다음 절차에서는 기술 qna.yaml 파일이 포함된 taxonomy 트리를 생성하는 방법을 보여줍니다.

사전 요구 사항

  • 부팅 가능한 컨테이너 이미지를 사용하여 RHEL AI를 설치했습니다.
  • InstructLab을 초기화하고 ilab CLI를 사용할 수 있습니다.
  • 시스템에서 root 사용자 액세스 권한이 있어야 합니다.

프로세스

  1. taxonomy 디렉토리인 compositional_skills 폴더로 이동합니다.

    중요

    기본 기술 생성, 코드 생성 기술은 현재 RHEL AI 버전 1.5에서 지원되지 않습니다.

  2. 트리에 존재하는 디렉터리에 따라 기술 qna.yaml 파일을 추가할 트리에서 위치를 선택합니다.

    taxonomy 트리의 파일 경로 예

    taxonomy/compositional_skills/grounded/<add_example>/qna.yaml

  3. 원하는 텍스트 편집기를 사용하여 qna.yaml 파일을 생성합니다.

    참고

    SDG가 올바르게 실행되려면 qna.yaml 파일에 최소 5개의 질문 및 응답 쌍 예제를 포함해야 합니다.

  4. qna.yaml 파일에 필요한 키를 추가하고 변경 사항을 저장합니다. qna.yaml 파일 포맷에 대한 자세한 내용은 "Sample skill YAML 사양"을 참조하십시오.

검증

  • 기술이 적절한 형식인지 확인하려면 다음 명령을 실행합니다.

    $ ilab taxonomy diff

    CLI는 taxonomy 트리 및 qna.yaml 파일이 유효하고 올바르게 포맷된 경우 표시됩니다. CLI는 또한 발생할 수 있는 오류를 수정할 위치를 표시합니다.

    유효한 taxonomy 트리 및 qna.yaml 파일의 출력 예

    compositional_skills/writing/freeform/<example>/qna.yaml
    Taxonomy in /taxonomy/ is valid :)

    오류가 있는 잘못된 taxonomy 트리 및 qna.yaml 파일의 출력 예

    6:11 error syntax error: mapping values are not allowed here (syntax)
    Reading taxonomy failed with the following error: 1 taxonomy with errors! Exiting.

3.2. 샘플 기술 YAML 사양

기술은 지식 YAML 파일과 유사한 질문 및 응답 레이아웃을 공유합니다. RHEL AI에서 합성 데이터 생성(SDG) 프로세스는 qna.yaml 시드 예제를 사용하여 사용자가 생성한 데이터에만 의존하는 대신 모델이 학습할 수 있는 많은 인공 데이터 세트를 생성합니다.

질문, 응답 및 컨텍스트 쌍의 순서는 SDG 또는 교육 프로세스에 영향을 미치지 않습니다. 자유형, 기반 및 기본 기술 범주로 구분되는 여러 유형의 기술이 있습니다. 다음 예제에서는 각 카테고리의 샘플을 볼 수 있습니다.

freeform 구성 기술 qna.yaml 파일의 예

version: 2 
1

created_by: <user-name> 
2

task_description: 'Teach the model how to rhyme.' 
3

seed_examples:
  - question: What are 5 words that rhyme with horn? 
4

    answer: warn, torn, born, thorn, and corn. 
5

  - question: What are 5 words that rhyme with cat?
    answer: bat, gnat, rat, vat, and mat.
  - question: What are 5 words that rhyme with poor?
    answer: door, shore, core, bore, and tore.
  - question: What are 5 words that rhyme with bank?
    answer: tank, rank, prank, sank, and drank.
  - question: What are 5 words that rhyme with bake?
    answer: wake, lake, steak, make, and quake.

접지된 구성 기술 qna.yaml 파일의 예

version: 2 
1

created_by: <user-name> 
2

task_description: This skill provides the ability to read a markdown-formatted table. 
3

seed_examples:
  - context: | 
4

      | **Breed**      | **Size**     | **Barking** | **Energy** |
      |----------------|--------------|-------------|------------|
      | Afghan Hound   | 25-27 in     | 3/5         | 4/5        |
      | Labrador       | 22.5-24.5 in | 3/5         | 5/5        |
      | Cocker Spaniel | 14.5-15.5 in | 3/5         | 4/5        |
      | Poodle (Toy)   | <= 10 in     | 4/5         | 4/5        |
    question: | 
5

      Which breed has the most energy?
    answer: | 
6

      The breed with the most energy is the Labrador.
  - context: |
      | **Name** | **Date** | **Color** | **Letter** | **Number** |
      |----------|----------|-----------|------------|------------|
      | George   | Mar 5    | Green     | A          | 1          |
      | Gráinne  | Dec 31   | Red       | B          | 2          |
      | Abigail  | Jan 17   | Yellow    | C          | 3          |
      | Bhavna   | Apr 29   | Purple    | D          | 4          |
      | Rémy     | Sep 9    | Blue      | E          | 5          |
    question: |
      What is Gráinne's letter and what is her color?
    answer: |
      Gráinne's letter is B and her color is red.
  - context: |
      | Banana | Apple      | Blueberry | Strawberry |
      |--------|------------|-----------|------------|
      | Yellow | Red, Green | Blue      | Red        |
      | Large  | Medium     | Small     | Small      |
      | Peel   | Peel       | No peel   | No peel    |
    question: |
      Which fruit is blue, small, and has no peel?
    answer: |
      The blueberry is blue, small, and has no peel.

1 1
기술 qna.yaml 형식의 버전을 지정합니다.
2 2
이름 또는 git 사용자 이름을 지정합니다.
3 3
기술 및 해당 기능에 대한 설명을 지정합니다.
4
모델이 기술 실행을 위해 알아야 하는 정보가 포함된 추가 컨텍스트를 지정합니다. 접착된 기술에 필요합니다.
4 5
모델에 대한 질문을 지정합니다.
5 6
모델에서 원하는 응답을 지정합니다.

4장. 모델 성능을 최적화하기 위한 YAML 생성 사례

taxonomy tree 및 taxonomy 트리에 기술 추가 기술 추가에서 참조된 지침은 기술 및 지식 YAML 파일을 생성하는 데 대한 표준 지침을 제공합니다. 그러나 YAML 파일을 개선하여 생성된 syndetic 데이터를 최적화하고 더 높은 품질 모델을 생성할 수 있는 방법이 있습니다.

YAML 파일의 컨텍스트 필드에 있는 다양하고 포괄적인 콘텐츠

컨텍스트 블록에는 문서의 다양한 정보와 형식 유형이 포함되어야 합니다. 이를 통해 모델은 다양한 정보를 제공하는 방법을 배울 수 있습니다. 이러한 다양한 정보 프레젠테이션 유형에는 단락, 유형 테이블, 목록, 프로시저 및 정의가 포함될 수 있습니다.

컨텍스트 블록은 문서의 포괄적인 예여야 합니다. 컨텍스트 콘텐츠 및 Q&A 쌍의 총 길이는 750 토큰을 초과해서는 안 됩니다.

효과적인 질문 작성

질문은 모델이 답변할 수 있도록 원하는 질문 유형과 일치해야 합니다. 각 질문은 고유해야 하며 컨텍스트 필드의 정보를 참조해야 합니다. 전체 문장 질문을 포함하면 생성된 합성 데이터가 개선되고 모델 응답 품질이 향상됩니다.

효과적인 답변 작성

답변은 질문에 직접 응답하고 모델이 제공할 수 있는 응답 유형을 반영해야 합니다. 답변은 완전한 문장으로 되어 있어야 하며 원본 질문을 참조합니다. 전체 문장 응답을 포함하면 생성된 합성 데이터가 향상되고 모델 응답 품질이 향상됩니다.

답변은 컨텍스트 블록에서 직접 복사해서는 안되며, 이로 인해 모델이 추론 대신 추출을 배울 수 있습니다.

질문에 답변할 정보는 context 블록에 있어야 합니다. 정보가 별도의 컨텍스트 블록에 있거나 전혀 참조되지 않은 경우 모델을 사용할 수 있습니다.

수준 높은 질문 및 응답 쌍의 예

- question: How many eggs are needed to make roughly 24 chocolate chip cookies?

  answer: You need around two eggs to make 24 chocolate chip cookies.

여러 문서 또는 여러 qna.yaml 파일을 사용하는 경우

여러 문서가 유사한 제목 또는 도메인과 관련된 경우 단일 qna.yaml 파일을 사용하는 것이 좋습니다. 각 qna.yaml 파일에는 단일 문서 유형이 포함되어야 하며 YAML 파일에서 문서 유형을 혼합할 수 없습니다.

문서가 관련이 없는 경우 별도의 qna.yaml 파일을 사용하는 것이 좋습니다.

YAML 파일에 링크 추가

모델은 링크를 암기할 수 있으므로 YAML 파일에 추가할 수 있습니다. 그러나 자주 변경되는 경우 하이퍼링크를 추가하지 않는 것이 좋습니다.

법적 공지

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동