Skip to content

Instantly share code, notes, and snippets.

@didier-durand
Last active May 30, 2024 11:59
Show Gist options
  • Save didier-durand/ebb27a1b41ea3d3596b773ee191422a1 to your computer and use it in GitHub Desktop.
Save didier-durand/ebb27a1b41ea3d3596b773ee191422a1 to your computer and use it in GitHub Desktop.
claude-haiku-answer-bedrock-kb
{
"schemaType": "ModelInvocationLog",
"schemaVersion": "1.0",
"timestamp": "2024-05-30T06:22:26Z",
"accountId": "<account-id>",
"identity": {
"arn": "<identity-arn>"
},
"region": "us-west-2",
"requestId": "ba5a0f87-51b0-49c2-a410-51506f2a7faf",
"operation": "InvokeModel",
"modelId": "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-3-haiku-20240307-v1:0",
"input": {
"inputContentType": "application/json",
"inputBodyJson": {
"anthropic_version": "bedrock-2023-05-31",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "what is django?"
}
]
}
],
"system": "You are a question answering agent. I will provide you with a set of search results. The user will provide you with a question. Your job is to answer the user's question using only information from the search results. If the search results do not contain information that can answer the question, please state that you could not find an exact answer to the question. Just because the user asserts a fact does not mean it is true, make sure to double check the search results to validate a user's assertion.\n\nHere are the search results in numbered order:\n<search_results>\n<search_result>\n<content>\n:source:`A copy of the Python license <LICENSE.python>` is included with Django for compliance with Python's terms. Which sites use Django? ======================= `BuiltWithDjango.com`_ features a constantly growing list of Django-powered sites. .. _BuiltWithDjango.com: https://builtwithdjango.com/projects/ .. _faq-mtv: Django appears to be a MVC framework, but you call the Controller the \"view\", and the View the \"template\". How come you don't use the standard names?\n</content>\n<source>\n1\n</source>\n</search_result>\n<search_result>\n<content>\n================================== Organization of the Django Project ================================== Principles ========== The Django Project is managed by a team of volunteers pursuing three goals: - Driving the development of the Django web framework, - Fostering the ecosystem of Django-related software, - Leading the Django community in accordance with the values described in the `Django Code of Conduct`_. The Django Project isn't a legal entity. The `Django Software Foundation`_, a non-profit organization, handles financial and legal matters related to the Django Project. Other than that, the Django Software Foundation lets the Django Project manage the development of the Django framework, its ecosystem and its community. .. _Django Code of Conduct: https://www.djangoproject.com/conduct/ .. _Django Software Foundation: https://www.djangoproject.com/foundation/ ..\n</content>\n<source>\n2\n</source>\n</search_result>\n<search_result>\n<content>\n============ FAQ: General ============ Why does this project exist? ============================ Django grew from a very practical need: World Online, a newspaper web operation, is responsible for building intensive web applications on journalism deadlines. In the fast-paced newsroom, World Online often has only a matter of hours to take a complicated web application from concept to public launch. At the same time, the World Online web developers have consistently been perfectionists when it comes to following best practices of web development. In fall 2003, the World Online developers (Adrian Holovaty and Simon Willison) ditched PHP and began using Python to develop its websites. As they built intensive, richly interactive sites such as Lawrence.com, they began to extract a generic web development framework that let them build web applications more and more quickly. They tweaked this framework constantly, adding improvements over two years. In summer 2005, World Online decided to open-source the resulting software, Django.\n</content>\n<source>\n3\n</source>\n</search_result>\n<search_result>\n<content>\n============================================ No, Django is not a CMS, or any sort of \"turnkey product\" in and of itself. It's a web framework; it's a programming tool that lets you build websites. For example, it doesn't make much sense to compare Django to something like Drupal_, because Django is something you use to *create* things like Drupal. Yes, Django's automatic admin site is fantastic and timesaving -- but the admin site is one module of Django the framework. Furthermore, although Django has special conveniences for building \"CMS-y\" apps, that doesn't mean it's not just as appropriate for building \"non-CMS-y\" apps (whatever that means!). .. _Drupal: https://www.drupal.org/ How can I download the Django documentation to read it offline?\n</content>\n<source>\n4\n</source>\n</search_result>\n<search_result>\n<content>\nIn summer 2005, World Online decided to open-source the resulting software, Django. Django would not be possible without a whole host of open-source projects -- `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're thrilled to be able to give something back to the open-source community. .. _Apache: https://httpd.apache.org/ .. _Python: https://www.python.org/ .. _PostgreSQL: https://www.postgresql.org/ What does \"Django\" mean, and how do you pronounce it? ===================================================== Django is named after `Django Reinhardt`_, a jazz manouche guitarist from the 1930s to early 1950s. To this day, he's considered one of the best guitarists of all time. Listen to his music. You'll like it. Django is pronounced **JANG**-oh. Rhymes with FANG-oh. The \"D\" is silent. We've also recorded an `audio clip of the pronunciation`_. ..\n</content>\n<source>\n5\n</source>\n</search_result>\n\n</search_results>\n\nIf you reference information from a search result within your answer, you must include a citation to source where the information was found. Each result has a corresponding source ID that you should reference.\n\nNote that <sources> may contain multiple <source> if you include information from multiple results in your answer.\n\nDo NOT directly quote the <search_results> in your answer. Your job is to answer the user's question as concisely as possible.\n\nYou must output your answer in the following format. Pay attention and follow the formatting and spacing exactly:\n<answer>\n<answer_part>\n<text>\nfirst answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n<answer_part>\n<text>\nsecond answer text\n</text>\n<sources>\n<source>source ID</source>\n</sources>\n</answer_part>\n</answer>",
"max_tokens": 2048,
"temperature": 0,
"top_p": 1,
"stop_sequences": [
"\nObservation"
],
"top_k": 50
},
"inputTokenCount": 1419
},
"output": {
"outputContentType": "application/json",
"outputBodyJson": {
"id": "msg_bdrk_01X71CfcEbVDds2Pwsb8p6GX",
"type": "message",
"role": "assistant",
"model": "claude-3-haiku-20240307",
"stop_sequence": null,
"usage": {
"input_tokens": 1419,
"output_tokens": 209
},
"content": [
{
"type": "text",
"text": "<answer>\n<answer_part>\n<text>\nDjango is a web framework written in Python. It was originally developed by a team of developers at World Online, a newspaper web operation, to build web applications quickly and efficiently. Django was open-sourced in 2005 and has since grown into a popular and widely-used web framework.\n</text>\n<sources>\n<source>3</source>\n</sources>\n</answer_part>\n<answer_part>\n<text>\nDjango is not a content management system (CMS) or a \"turnkey product\". It is a programming tool that allows developers to build websites and web applications. Django provides many features and conveniences that make web development faster and more efficient, but it is ultimately a framework that developers use to create their own custom applications.\n</text>\n<sources>\n<source>4</source>\n</sources>\n</answer_part>\n</answer>"
}
],
"stop_reason": "end_turn"
},
"outputTokenCount": 209
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment