Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

챗봇 인용과 선택 동작

문서 또는 온톨로지 문맥을 사용하는 챗봇은 원본 자료를 여는 인용을 출력합니다. 메시지 아래 Sources에서도 사용된 출처를 확인합니다. 함수 기반 문맥과 도구에는 기본 인용이 없으므로 모델이 정해진 XML 형식을 응답하도록 지시해야 합니다.

인용 형식

다음 식별자와 사이트는 설명용 값입니다. 객체 RID를 아는 경우 key에 넣습니다.

<citation><key>ri.phonograph2-objects.main.object.abc-123</key></citation>

객체 유형 ID와 기본 키를 사용할 수도 있습니다. 객체 유형 ID는 Ontology Manager에서 확인합니다. 두 형식 모두 기본 선택 동작은 해당 객체의 Object Explorer 화면을 여는 것입니다.

<citation><objectTypeId>titan-technologies-support-ticket</objectTypeId><primaryKey>TICKET-015</primaryKey></citation>

PDF는 미디어 집합 RID와 미디어 항목 RID를 사용합니다. 페이지를 생략하면 첫 페이지를 열고 page를 지정하면 해당 페이지를 표시합니다.

<citation><mediaSetKey>ri.mio.main.media-set.example</mediaSetKey><mediaItemKey>ri.mio.main.media-item.example</mediaItemKey><page>12</page></citation>

외부 URL은 표시 이름과 주소를 제공합니다.

<citation><name>예시 웹사이트</name><href>https://example.com</href></citation>

온톨로지 문맥의 Citations 탭에서 객체, PDF 또는 외부 URL 형식으로 인용하게 구성할 수 있습니다.

전역 설정과 객체 유형별 재정의

인용을 전체적으로 켜거나 끌 수 있습니다. 기본적으로 객체 인용은 객체를, 문서 인용은 문서를 엽니다. 객체 유형별로 외부 URL 열기, PDF 열기 또는 변수 갱신으로 선택 동작을 바꿀 수 있습니다.

여러 객체 유형을 반환하는 함수에서는 유형별 인용 변수를 구성합니다. 사용자가 인용을 선택하면 일치하는 유형의 변수에는 해당 객체 하나를 포함한 집합이 들어가며 다른 인용 변수는 모두 빈 객체 집합으로 바뀝니다. 따라서 현재 선택한 대상에 해당하는 변수만 채워집니다.

Workshop 오버레이

  1. 챗봇의 인용 변수마다 Workshop에 빈 객체 집합 변수를 만듭니다.
  2. Chatbot 위젯에서 해당 변수들을 매핑합니다.
  3. Workshop 오버레이를 만들고 Variable-based visibility를 사용합니다.
  4. 해당 객체 집합이 비어 있지 않은지를 판단하는 불리언 변수로 표시 여부를 정합니다.

유형마다 별도 오버레이를 만들거나 여러 불리언 조건을 결합한 하나의 오버레이를 사용할 수 있습니다. 인용 선택에 따라 채워지는 객체를 다른 위젯에서도 표시할 수 있습니다.

인용 프롬프트 작성

화면에서 인용을 렌더링하려면 실제 LLM 응답에 XML이 포함되어야 합니다. LLM Settings 지시문에 형식을 넣거나 함수 기반 문맥의 retrievedPrompt에서 관련 객체와 형식을 함께 전달합니다.

Object query 결과에 인용 붙이기

다음은 가상의 지원 티켓 도구를 사용하는 프롬프트입니다. 티켓 질문에는 Object query를 사용하고 티켓을 언급할 때마다 객체 유형 ID와 기본 키를 인용하게 합니다. 객체 유형, 티켓 ID와 내용은 예시이며 실제 조회 결과에 맞춰야 합니다.

Whenever the user asks a question about support tickets, use the object query tool to answer it. After using the object query tool, respond to the user query with inline citations that link to the objects returned by the object query tool.

WHENEVER you mention a support ticket, output a citation in the format below:

"<citation><objectTypeId>titan-technologies-support-ticket</objectTypeId><primaryKey>...</primaryKey></citation>"

For example, if I wanted to cite the ticket titled Office Dress Code, I would get the primary key of the ticket, which is TICKET-015 (since the Ticket Id is TICKET-015), and then output the citation like so:

"The ticket about the office dress code says ... <citation><objectTypeId>titan-technologies-support-ticket</objectTypeId><primaryKey>TICKET-015</primaryKey></citation>.""

함수 기반 문맥에서 인용 구성하기

검색 함수는 모델 시스템 프롬프트에 삽입할 문자열을 반환합니다. 관련 객체의 내용과 인용 형식을 함께 제공하면 챗봇이 근거를 사용한 문장에 해당 객체 인용을 붙이도록 안내할 수 있습니다.

다음 프롬프트의 Source 1/2, 객체 RID와 Titan Technologies 자료는 형식을 설명하는 예시입니다. 실제 사용에서는 검색된 자료와 일치하는 이름 및 식별자를 넣습니다. 관련성순 정렬이 인용 대상의 정확성을 대신하지는 않습니다.

Incorporate a citation from the context source in your answer whenever the context content is used.

For example, if the message asks "What is X?"
A valid response would be "X is Y, according to <citation><name>Source 1</name><key>ri.phonograph2-objects.main.object.abc-123</key></citation>, ..."

Another example: if the message asks "Why is X?"
A valid response would be: "X is Y because ... For more details or further clarification, please refer to the following sources: <citation><name>Source 2</name><key>ri.phonograph2-objects.main.object.def-456</key></citation> <citation><name>Source 3</name><key>ri.phonograph2-objects.main.object.abc-123</key></citation>"

Remember, always include a citation in your answer by using the provided context sources.

Example context sources:

<citation><name>Source 1</name><key>ri.phonograph2-objects.main.object.0c94f9b2-e0c5-4e90-a054-96e570cd11dd</key></citation>
Consistency is key when teaching commands to your dog.
<citation><name>Source 1</name><key>ri.phonograph2-objects.main.object.0c94f9b2-e0c5-4e90-a054-96e570cd11dd</key></citation>

<citation><name>Source 2</name><key>ri.phonograph2-objects.main.object.8c6adc92-cfc6-4b76-b729-2744e369dac3</key></citation>
Socialization is important for a dog's development and behavior.
<citation><name>Source 2</name><key>ri.phonograph2-objects.main.object.8c6adc92-cfc6-4b76-b729-2744e369dac3</key></citation>

Example response with citation:

"Maintaining consistency is essential when training your dog to follow commands <citation><name>Source 1</name><key>ri.phonograph2-objects.main.object.0c94f9b2-e0c5-4e90-a054-96e570cd11dd</key></citation>. Socializing your dog is crucial for its behavioral development <citation><name>Source 2</name><key>ri.phonograph2-objects.main.object.8c6adc92-cfc6-4b76-b729-2744e369dac3</key></citation>."

[Context Sources Sorted by Relevancy]
<citation><key>ri.phonograph2-objects.main.object.60599f54-c745-412b-98a0-2c7f5f0fa9bf</key></citation>
.... The Titan Technologies dress code is business casual ....
<citation><key>ri.phonograph2-objects.main.object.60599f54-c745-412b-98a0-2c7f5f0fa9bf</key></citation>

<citation><key>ri.phonograph2-objects.main.object.35910c26-8a87-4eb5-8243-52afb88bba11</key></citation>
.... Titan Technologies Employee Handbook ....
<citation><key>ri.phonograph2-objects.main.object.35910c26-8a87-4eb5-8243-52afb88bba11</key></citation>

<citation><key>ri.phonograph2-objects.main.object.3f21b8a6-536b-4374-aaf5-cae641ca836c</key></citation>
.... At Titan Technologies, flexible work hours may be possible .....
<citation><key>ri.phonograph2-objects.main.object.3f21b8a6-536b-4374-aaf5-cae641ca836c</key></citation>

<citation><key>ri.phonograph2-objects.main.object.10b2d64a-4043-438d-894a-80c001ff26e2</key></citation>
.... The dress code for the office is business casual ....
<citation><key>ri.phonograph2-objects.main.object.10b2d64a-4043-438d-894a-80c001ff26e2</key></citation>
[/Context Sources Sorted by Relevancy]

REMINDER:
ALWAYS include citations in the correct format <citation><name>sourceName</name><key>sourceKey</key></citation> in all responses. ALWAYS include the source name and the source key in all citations.

Valid examples are <citation><name>Source 1</name><key>ri.phonograph2-objects.main.object.0c94f9b2-e0c5-4e90-a054-96e570cd11dd</key></citation>, <citation><name>Source 2</name><key>ri.phonograph2-objects.main.object.8c6adc92-cfc6-4b76-b729-2744e369dac3</key></citation>.