{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"e862aee4-19db-421c-9f9f-1f9f962628d7","name":"YottaAnswers - Public API","description":"The **YottaAnswers Public API** is a collection of routes that are open to the public to use the system to generate a collection of direct answers to a question from billions of possible answers. It's intended to be used in non-commerical use cases.\n\nCurrently, the API uses system the equivalent system of **Giga model** on the YottaAnswers site.\n\n# Getting Started\n\nBefore a user can even start using our API to its fullest capabilities, they first must sign up on [https://yottaanswers.com/api-registration](https://yottaanswers.com/api-registration) , upon registration they will be emailed a JWT key which they can use to access the unthrottled route.\n\nIf the user wants to test the API before signup they can with the public throttled route.\n\n# Example of use\n\n### Boost LLM results\n\nUsing API results to fill your LLMs, can significantly boost their results. It can be seen in the table, which shows experiment of exact question answering.\n\n| **Model** | **Base Accuracy** | **With API results Accuracy** | **Difference** |\n| --- | --- | --- | --- |\n| Flan T5 XL | 15% | 52% | +242% |\n| Phi 2 | 34% | 56% | +65% |\n| Mistral 7b | 37% | 55% | +47% |\n| Llama 7b | 43% | 55% | +28% |\n| Llama 13b | 43% | 60% | +39% |\n| GPT-3.5 | 56% | 62% | +10% |\n| GPT-4 | 61% | 61% | +0% |\n\nResults of API are used as additional input to a LLM. The API results used are from Giga model.\n\nWe are giving an code example of how to incorporate our API results to LLM generation\n\n``` python\nimport requests\ndef create_additional_information_yotta(answers_list:List[Dict[str, Any]],gather_answers:int=0) -> Tuple[str,List[str]]:\n    answers = []\n    links = []\n    list_of_answers = []\n    for a in answers_list:\n        answer,sentence = a['answer'].strip().strip('.').strip(),a['sentence'].strip().strip('.').strip()\n        links.append(a['link'])\n        start = sentence.find(answer)\n        list_of_answers.append(answer)\n        if start == -1:\n            sentence_highlight = sentence\n        else:\n            end = start + len(answer)\n            sentence_highlight = sentence[:start] + '**' + answer + '**' + sentence[end:]\n        answers.append(sentence_highlight)\n    context_highlight = '. '.join(answers[:gather_answers])\n    context_highlight = context_highlight + \".\"\n    return context_highlight,links[:gather_answers]\ndef call_model_generation(text_input:str) -> str:\n    return model.generate(text_input)\ndef call_yotta_api(question:str) -> List[Dict[str, Any]]:\n    payload = {\"question\": question}\n    headers = {\n        \"Authorization\": \"YOUR_API_KEY\",\n        \"Content-Type\": \"application/json\"\n    }\n    response = requests.request(\"POST\", yotta_api, json=payload, headers=headers)\n    answers = response.json()\n    return answers\nif __name__ == \"__main__\":\n    question = \"Yout question here.\"\n    answers = call_yotta_api(question)\n    context,links = create_additional_information_yotta(answers,5)\n    print(context)\n    print(links)\n    llm_input = f\"{question} {context}\"\n    llm_output = call_model_generation(llm_input)\n    print(llm_output)\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"21410829","team":3639637,"collectionId":"e862aee4-19db-421c-9f9f-1f9f962628d7","publishedId":"UzBnpm9G","public":true,"publicUrl":"https://documenter-api.postman.tech/view/21410829/UzBnpm9G","privateUrl":"https://go.postman.co/documentation/21410829-e862aee4-19db-421c-9f9f-1f9f962628d7","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.2","publishDate":"2022-08-02T16:38:43.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/df426c19a7147b7ed349193add98cc7ca348addd30cd2414744ea76f6a38e896","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/UzBnpm9G"}