{"info":{"_postman_id":"e862aee4-19db-421c-9f9f-1f9f962628d7","name":"YottaAnswers - Public API","description":"<html><head></head><body><p>The <strong>YottaAnswers Public API</strong> 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.</p>\n<p>Currently, the API uses system the equivalent system of <strong>Giga model</strong> on the YottaAnswers site.</p>\n<h1 id=\"getting-started\">Getting Started</h1>\n<p>Before a user can even start using our API to its fullest capabilities, they first must sign up on <a href=\"https://yottaanswers.com/api-registration\">https://yottaanswers.com/api-registration</a> , upon registration they will be emailed a JWT key which they can use to access the unthrottled route.</p>\n<p>If the user wants to test the API before signup they can with the public throttled route.</p>\n<h1 id=\"example-of-use\">Example of use</h1>\n<h3 id=\"boost-llm-results\">Boost LLM results</h3>\n<p>Using 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.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Model</strong></th>\n<th><strong>Base Accuracy</strong></th>\n<th><strong>With API results Accuracy</strong></th>\n<th><strong>Difference</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Flan T5 XL</td>\n<td>15%</td>\n<td>52%</td>\n<td>+242%</td>\n</tr>\n<tr>\n<td>Phi 2</td>\n<td>34%</td>\n<td>56%</td>\n<td>+65%</td>\n</tr>\n<tr>\n<td>Mistral 7b</td>\n<td>37%</td>\n<td>55%</td>\n<td>+47%</td>\n</tr>\n<tr>\n<td>Llama 7b</td>\n<td>43%</td>\n<td>55%</td>\n<td>+28%</td>\n</tr>\n<tr>\n<td>Llama 13b</td>\n<td>43%</td>\n<td>60%</td>\n<td>+39%</td>\n</tr>\n<tr>\n<td>GPT-3.5</td>\n<td>56%</td>\n<td>62%</td>\n<td>+10%</td>\n</tr>\n<tr>\n<td>GPT-4</td>\n<td>61%</td>\n<td>61%</td>\n<td>+0%</td>\n</tr>\n</tbody>\n</table>\n</div><p>Results of API are used as additional input to a LLM. The API results used are from Giga model.</p>\n<p>We are giving an code example of how to incorporate our API results to LLM generation</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-python\">import requests\ndef create_additional_information_yotta(answers_list:List[Dict[str, Any]],gather_answers:int=0) -&gt; 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) -&gt; str:\n    return model.generate(text_input)\ndef call_yotta_api(question:str) -&gt; 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</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Getting Started","slug":"getting-started"},{"content":"Example of use","slug":"example-of-use"}],"owner":"21410829","collectionId":"e862aee4-19db-421c-9f9f-1f9f962628d7","publishedId":"UzBnpm9G","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-08-02T16:38:43.000Z"},"item":[{"name":"Public Route","id":"141f1fcf-997e-4a8f-aabf-f1a362732740","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"question\": \"What is quantitative easing?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.yottaanswers.com/api/v1/publicQuestion","description":"<p>A throttled route that anyone can access without a key that can be used to test the API before actually signing up for the API key.</p>\n<p>The request takes a single parameter in the body of the POST request, it being a question written in plain text.</p>\n<p>For optimal performance, be sure that the question being passed is properly written with no grammatical errors.</p>\n","urlObject":{"protocol":"https","path":["api","v1","publicQuestion"],"host":["api","yottaanswers","com"],"query":[],"variable":[]}},"response":[{"id":"b348190b-5cf9-4826-93c3-32f514225fdb","name":"Public Route","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"question\": \"What is quantitative easing?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.yottaanswers.com/api/v1/publicQuestion"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Thu, 28 Mar 2024 15:11:41 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"Expect-CT","value":"max-age=0"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"RateLimit-Limit","value":"5"},{"key":"RateLimit-Remaining","value":"4"},{"key":"RateLimit-Reset","value":"6"},{"key":"ETag","value":"W/\"1643-95b0LFUsLYUTDx2yf+lrWO9uz9s\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"answer\": \"an unconventional monetary policy used by central banks to stimulate the national economy when conventional monetary policy has become ineffective\",\n        \"link\": \"https://www.barrypopik.com/index.php/new_york_city/entry/qeternity_quantitative_easing_or_qe_eternity\",\n        \"sentence\": \"Quantitative easing (QE) is an unconventional monetary policy used by central banks to stimulate the national economy when conventional monetary policy has become ineffective.\",\n        \"links\": [\n            \"https://www.barrypopik.com/index.php/new_york_city/entry/qeternity_quantitative_easing_or_qe_eternity\",\n            \"https://www.ibjonline.com/past-issues/2014-issues/august-2014/3867-tina-calls-shots-with-today-s-stock-market\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"the name of the game and \",\n        \"link\": \"http://greatdepression2006.blogspot.com/2010/10/\",\n        \"sentence\": \"Quantitative Easing is the name of the game and everyone with paper dollars gets to play\",\n        \"links\": [\n            \"http://greatdepression2006.blogspot.com/2010/10/\",\n            \"http://sufiy.blogspot.com/2008/11/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy where central banks buy long-term bonds from private investors, like pension funds or insurance companies, using newly created (digital) money\",\n        \"link\": \"http://trading24.pro/speculation/61524\",\n        \"sentence\": \"QUANTITATIVE EASING is a monetary policy where central banks buy long-term bonds from private investors, like pension funds or insurance companies, using newly created (digital) money.\",\n        \"links\": [\n            \"http://trading24.pro/speculation/61524\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy in which a central bank purchases government securities or other securities from the market in order to lower interest rates and increase the money supply\",\n        \"link\": \"https://www.osterweis.com/video/Carl_Eddy\",\n        \"sentence\": \"Quantitative easing is a monetary policy in which a central bank purchases government securities or other securities from the market in order to lower interest rates and increase the money supply. \",\n        \"links\": [\n            \"https://www.osterweis.com/video/Carl_Eddy\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a program that was added in recent years to adjust interest rates, over and above the impacts available from changes to short-term interest rates\",\n        \"link\": \"https://ourfiniteworld.com/2018/08/27/how-energy-shortages-really-affect-the-economy/comment-page-28/\",\n        \"sentence\": \"Quantitative Easing (QE) is a program that was added in recent years to adjust interest rates, over and above the impacts available from changes to short-term interest rates.\",\n        \"links\": [\n            \"https://ourfiniteworld.com/2018/08/27/how-energy-shortages-really-affect-the-economy/comment-page-28/\"\n        ]\n    },\n    {\n        \"answer\": \"a programme where the Fed reduces the interest rate in the economy indirectly by buying large quantity of government and corporate bonds\",\n        \"link\": \"https://www.indianeconomy.net/splclassroom/how-the-us-feds-monetary-policy-influences-india/\",\n        \"sentence\": \"Quantitative Easing is a programme where the Fed reduces the interest rate in the economy indirectly by buying large quantity of government and corporate bonds.\",\n        \"links\": [\n            \"https://www.indianeconomy.net/splclassroom/how-the-us-feds-monetary-policy-influences-india/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy used by a central bank to replace a standard monetary policy and stimulate the economy\",\n        \"link\": \"http://www.versiondaily.com/what-is-quantitative-easing/\",\n        \"sentence\": \"By definition, quantitative easing is a monetary policy used by a central bank to replace a standard monetary policy and stimulate the economy. \",\n        \"links\": [\n            \"http://www.versiondaily.com/what-is-quantitative-easing/\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a strategy used by central banks to increase the money available in the economy by purchasing marketable securities\",\n        \"link\": \"https://www.higherrockeducation.org/glossary-of-terms/quantitative-easing\",\n        \"sentence\": \"Quantitative easing is a strategy used by central banks to increase the money available in the economy by purchasing marketable securities.\",\n        \"links\": [\n            \"https://www.higherrockeducation.org/glossary-of-terms/quantitative-easing\"\n        ]\n    },\n    {\n        \"answer\": \"an experiment which the coalition does not fully comprehend nor knows where the coalition may lead\",\n        \"link\": \"https://moneyweek.com/230692/adam-fergusson-putting-your-trust-in-money-63410/\",\n        \"sentence\": \"Quantitative easing, Mein Kampfis reported to have said, is an experiment which the coalition does not fully comprehend nor knows where the coalition may lead.\",\n        \"links\": [\n            \"https://moneyweek.com/230692/adam-fergusson-putting-your-trust-in-money-63410/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy measure of central banks that aims to stimulate economic growth by purchasing government bonds and other securities from banks and other private institutions to raise the volume of money in the market, increasing liquidity and supporting lending by banks\",\n        \"link\": \"https://www.bcg.com/publications/2014/financial-institutions-risk-management-building-transparent-bank-global-risk.aspx\",\n        \"sentence\": \"Quantitative easing is a monetary policy measure of central banks that aims to stimulate economic growth by purchasing government bonds and other securities from banks and other private institutions to raise the volume of money in the market, increasing liquidity and supporting lending by banks. \",\n        \"links\": [\n            \"https://www.bcg.com/publications/2014/financial-institutions-risk-management-building-transparent-bank-global-risk.aspx\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    }\n]"}],"_postman_id":"141f1fcf-997e-4a8f-aabf-f1a362732740"},{"name":"Private Route","id":"3522f32f-9cfb-40db-bfe6-d2ae2f2864d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"warning":"This is a duplicate header and will be overridden by the Authorization header generated by Postman.","key":"Authorization","value":"Bearer <token>","description":"<p>API Token received upon registration</p>\n","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"question\": \"What is quantitative easing?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.yottaanswers.com/api/v1/privateQuestion","description":"<p>An unthrottled route that can be accessed with an API key which can be obtained on <a href=\"https://yottaanswers.com/api-registration\">https://yottaanswers.com/api-registration</a>.</p>\n<p>The request takes a single parameter in the body of the POST request, it being a question written in plain text.</p>\n<p>For optimal performance, be sure that the question being passed is properly written with no grammatical errors.</p>\n<p>EndFragment</p>\n","urlObject":{"protocol":"https","path":["api","v1","privateQuestion"],"host":["api","yottaanswers","com"],"query":[],"variable":[]}},"response":[{"id":"0bc673d1-783d-43fb-8212-c7d9aef88201","name":"Private Route","originalRequest":{"method":"POST","header":[{"warning":"This is a duplicate header and will be overridden by the Authorization header generated by Postman.","key":"Authorization","value":"Bearer <token>","description":"API Token received upon registration","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"question\": \"What is quantitative easing?\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.yottaanswers.com/api/v1/privateQuestion"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.18.0 (Ubuntu)"},{"key":"Date","value":"Thu, 28 Mar 2024 15:12:24 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"Expect-CT","value":"max-age=0"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"ETag","value":"W/\"1643-95b0LFUsLYUTDx2yf+lrWO9uz9s\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"Content-Encoding","value":"gzip"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"answer\": \"an unconventional monetary policy used by central banks to stimulate the national economy when conventional monetary policy has become ineffective\",\n        \"link\": \"https://www.barrypopik.com/index.php/new_york_city/entry/qeternity_quantitative_easing_or_qe_eternity\",\n        \"sentence\": \"Quantitative easing (QE) is an unconventional monetary policy used by central banks to stimulate the national economy when conventional monetary policy has become ineffective.\",\n        \"links\": [\n            \"https://www.barrypopik.com/index.php/new_york_city/entry/qeternity_quantitative_easing_or_qe_eternity\",\n            \"https://www.ibjonline.com/past-issues/2014-issues/august-2014/3867-tina-calls-shots-with-today-s-stock-market\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"the name of the game and \",\n        \"link\": \"http://greatdepression2006.blogspot.com/2010/10/\",\n        \"sentence\": \"Quantitative Easing is the name of the game and everyone with paper dollars gets to play\",\n        \"links\": [\n            \"http://greatdepression2006.blogspot.com/2010/10/\",\n            \"http://sufiy.blogspot.com/2008/11/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy where central banks buy long-term bonds from private investors, like pension funds or insurance companies, using newly created (digital) money\",\n        \"link\": \"http://trading24.pro/speculation/61524\",\n        \"sentence\": \"QUANTITATIVE EASING is a monetary policy where central banks buy long-term bonds from private investors, like pension funds or insurance companies, using newly created (digital) money.\",\n        \"links\": [\n            \"http://trading24.pro/speculation/61524\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy in which a central bank purchases government securities or other securities from the market in order to lower interest rates and increase the money supply\",\n        \"link\": \"https://www.osterweis.com/video/Carl_Eddy\",\n        \"sentence\": \"Quantitative easing is a monetary policy in which a central bank purchases government securities or other securities from the market in order to lower interest rates and increase the money supply. \",\n        \"links\": [\n            \"https://www.osterweis.com/video/Carl_Eddy\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a program that was added in recent years to adjust interest rates, over and above the impacts available from changes to short-term interest rates\",\n        \"link\": \"https://ourfiniteworld.com/2018/08/27/how-energy-shortages-really-affect-the-economy/comment-page-28/\",\n        \"sentence\": \"Quantitative Easing (QE) is a program that was added in recent years to adjust interest rates, over and above the impacts available from changes to short-term interest rates.\",\n        \"links\": [\n            \"https://ourfiniteworld.com/2018/08/27/how-energy-shortages-really-affect-the-economy/comment-page-28/\"\n        ]\n    },\n    {\n        \"answer\": \"a programme where the Fed reduces the interest rate in the economy indirectly by buying large quantity of government and corporate bonds\",\n        \"link\": \"https://www.indianeconomy.net/splclassroom/how-the-us-feds-monetary-policy-influences-india/\",\n        \"sentence\": \"Quantitative Easing is a programme where the Fed reduces the interest rate in the economy indirectly by buying large quantity of government and corporate bonds.\",\n        \"links\": [\n            \"https://www.indianeconomy.net/splclassroom/how-the-us-feds-monetary-policy-influences-india/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy used by a central bank to replace a standard monetary policy and stimulate the economy\",\n        \"link\": \"http://www.versiondaily.com/what-is-quantitative-easing/\",\n        \"sentence\": \"By definition, quantitative easing is a monetary policy used by a central bank to replace a standard monetary policy and stimulate the economy. \",\n        \"links\": [\n            \"http://www.versiondaily.com/what-is-quantitative-easing/\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    },\n    {\n        \"answer\": \"a strategy used by central banks to increase the money available in the economy by purchasing marketable securities\",\n        \"link\": \"https://www.higherrockeducation.org/glossary-of-terms/quantitative-easing\",\n        \"sentence\": \"Quantitative easing is a strategy used by central banks to increase the money available in the economy by purchasing marketable securities.\",\n        \"links\": [\n            \"https://www.higherrockeducation.org/glossary-of-terms/quantitative-easing\"\n        ]\n    },\n    {\n        \"answer\": \"an experiment which the coalition does not fully comprehend nor knows where the coalition may lead\",\n        \"link\": \"https://moneyweek.com/230692/adam-fergusson-putting-your-trust-in-money-63410/\",\n        \"sentence\": \"Quantitative easing, Mein Kampfis reported to have said, is an experiment which the coalition does not fully comprehend nor knows where the coalition may lead.\",\n        \"links\": [\n            \"https://moneyweek.com/230692/adam-fergusson-putting-your-trust-in-money-63410/\"\n        ]\n    },\n    {\n        \"answer\": \"a monetary policy measure of central banks that aims to stimulate economic growth by purchasing government bonds and other securities from banks and other private institutions to raise the volume of money in the market, increasing liquidity and supporting lending by banks\",\n        \"link\": \"https://www.bcg.com/publications/2014/financial-institutions-risk-management-building-transparent-bank-global-risk.aspx\",\n        \"sentence\": \"Quantitative easing is a monetary policy measure of central banks that aims to stimulate economic growth by purchasing government bonds and other securities from banks and other private institutions to raise the volume of money in the market, increasing liquidity and supporting lending by banks. \",\n        \"links\": [\n            \"https://www.bcg.com/publications/2014/financial-institutions-risk-management-building-transparent-bank-global-risk.aspx\",\n            \"https://blog.creditcardslab.com/what-is-quantitative-easing-and-why-should-you-care.html\"\n        ]\n    }\n]"}],"_postman_id":"3522f32f-9cfb-40db-bfe6-d2ae2f2864d9"}]}