긴 컨텍스트 기간 활용 - Amazon Nova

긴 컨텍스트 기간 활용

Amazon Nova Premier의 지원되는 컨텍스트 길이는 100만 개의 토큰으로, 100만 개의 텍스트 토큰, 500개의 이미지 또는 90분의 비디오로 변환됩니다. Amazon Nova Premier는 긴 문서에 대한 코드 이해와 질문의 답변에 탁월합니다. 컨텍스트 크기가 증가함에 따라 성능이 약간 저하될 수 있으므로 최상의 결과를 얻으려면 다음 지침을 고려하세요.

  • 긴 형식 데이터를 시작 부분에 배치: 긴 문서와 입력을 프롬프트 시작 부분에 배치합니다. 쿼리, 지침, 예제의 앞에 넣어야 합니다.

  • 끝에 지침 배치: 프롬프트 끝에 지침을 배치합니다. 모델은 컨텍스트가 먼저 제공되고 지침이 끝에 제공될 때 가장 성능이 좋습니다.

  • 문서 콘텐츠 시작 및 종료 마커 구조화: [Document Start][Document End]와 같은 시작 및 종료 마커를 사용하여 긴 문서의 시작과 끝을 나타냅니다.

    다음은 예제 템플릿입니다.

    // Provide your long inputs at the top of your prompt [Document Start] {{ Your document}} [Document End] // Then specify your query and instructions {{ User query}} {{ Instructions}}
  • 인용 마커를 사용하여 응답 근거: 긴 문서 작업의 경우 Amazon Nova 모델이 작업을 진행하기 전에 문서의 관련 섹션의 인용을 사용하여 응답을 근거하도록 지시하는 것이 좋습니다. 이 접근 방식은 모델이 가장 관련성이 높은 정보에 집중하고 불필요한 콘텐츠로 인해 산만해지는 것을 방지하는 데 도움이 됩니다. 모델에 응답을 근거하도록 요청할 때 인용할 수 있는 섹션은 숫자여야 합니다. 예를 들어, Passage %[1]%, Passage %[2]% 등 또는 단순히 <C1>, <C2> 등입니다. 프롬프트에 인용을 포함하는 방법에 대한 자세한 내용은 자체 RAG 구축을 참조하세요.

    다음은 프롬프트의 예입니다.

    """ You are an AI financial assistant. Your task is to find patterns and insights from multi-year financial documents Passage %[1]% {{ Your document}} Passage %[2]% {{ Your document}} Passage %[3]% {{ Your document}} Passage %[4]% {{ Your document}} ## Task: Analyze Amazon's financial reports across multiple years to identify significant performance trends, segment growth patterns, and strategic shifts. ## Context information: - You have access to Amazon's annual financial reports (10-K) for multiple fiscal years in PDF format - These reports contain comprehensive financial data including income statements, balance sheets, cash flow statements, and management discussions - The analysis should focus on year-over-year comparisons to identify meaningful trends - Amazon operates multiple business segments including North America retail, International retail, Amazon Web Services (AWS), advertising, and subscription services Based on the provided Context, extract key financial metrics from each year's reports phrases from the documents, citing them using %[1]%, %[2]%, %[3]%, and for the corresponding passage that supports the response. ## Response Schema: %[1]% (Extracted Financial Metrics) %[2]% (Extracted Financial Metrics) %[3]% (Extracted Financial Metrics) ... """

    사용자의 작업을 기반으로 주요 정보를 추출한 후, 추출된 재무 지표를 사용하여 다음과 같이 관련 질문에 답할 수 있습니다.

    """ ## Task Analyze Amazon's financial reports across multiple years to identify significant performance trends, segment growth patterns, and strategic shifts. {{ extracted financial metrics }} ## Model Instructions: - Organize data chronologically to identify meaningful trends - DO compare segment performance across the five-year period - DO identify significant strategic shifts or investments mentioned in management discussions - DO NOT make speculative predictions beyond what is supported by the data - ALWAYS note any changes in accounting practices or reporting methodologies that might affect year-over-year comparisons ## Response style and format requirements: - Respond in markdown - Structure the analysis with clear headings and subheadings - Present key financial metrics in tabular format showing all five years side-by-side - Include percentage changes year-over-year for all major metrics - Create a section dedicated to visualizing the most significant trends (with descriptions of what would be shown in charts) - Limit the executive summary to 250 words maximum - Format segment analysis as separate sections with consistent metrics across all segments - MUST include a Key Insights bullet-pointed list at the end of each major section