mirror of
https://github.com/james-m-jordan/openai-cookbook.git
synced 2025-05-09 19:32:38 +00:00
1755 lines
1.8 MiB
CSV
1755 lines
1.8 MiB
CSV
![]() |
content,embeddings
|
|||
|
"Overview
|
|||
|
Retrieval-Augmented Generationenhances the capabilities of languagemodels by combining them with aretrieval system. This allows the modelto leverage external knowledge sourcesto generate more accurate andcontextually relevant responses.
|
|||
|
Example use cases
|
|||
|
- Provide answers with up-to-date
|
|||
|
information
|
|||
|
- Generate contextual responses
|
|||
|
What we’ll cover
|
|||
|
● Technical patterns
|
|||
|
● Best practices
|
|||
|
● Common pitfalls
|
|||
|
● Resources
|
|||
|
","[-0.013741373, 0.029359376, 0.054372873, 0.022729442, -0.027704978, 0.0035402863, -0.0035649787, 0.03622389, -0.02171705, 0.03780421, 0.010364674, -0.05861998, 0.010574561, -0.033705253, 0.0028211174, -0.006549684, -0.017346477, -0.0056947065, -0.038470905, 0.014136453, 0.015432809, -0.0097535355, -0.0064756065, 0.01128447, -0.009099184, -0.02118616, -0.021815818, 0.0776332, 0.010457271, -0.01970461, 0.022223245, -0.030840926, -0.033384252, -0.0044816877, 0.036767125, 0.021951627, 0.049804762, 0.012691942, -0.00024210219, 0.035754733, 0.02871737, -0.015420463, -0.0032408899, 0.059657067, 0.019235453, 0.04076731, -0.013445063, -0.028421061, -0.007932464, 0.07200331, -0.034371953, -0.020321922, -0.008932509, -0.03614981, -0.028988987, -0.03612512, -0.024643108, -0.0047070067, 0.0044076103, 0.016729165, -0.026643202, -0.03247063, -0.0018673699, -0.005950891, -0.021902243, -0.0007863016, -0.0013974408, 0.023741834, -0.0075373836, 0.021803472, 0.01509946, 0.011210392, -0.007463306, -0.010957294, -0.0038088171, 0.040545076, 0.029581608, 0.025075227, -0.010290597, -0.028816141, 0.013568525, -0.034199104, -0.0041236463, -0.030421153, -0.012080803, 0.017655132, -0.022149168, -0.00021509477, -0.024322107, -0.015568618, -0.047187354, 0.0106918495, -0.021309622, 0.027334591, 0.01993919, 0.037557285, -0.0041730315, 0.008204081, 0.05019984, 0.03921168, 0.002098862, -0.071756385, -0.0069694566, -0.017111897, 0.05010107, -0.031063158, -0.059854604, 0.016272353, -0.017457593, -0.0202355, -0.097979814, -0.036372043, -0.0018797161, -0.005534205, 0.0025834523, -0.021000966, -0.032816324, 0.006944764, 0.02456903, -0.010938775, 0.004824296, 0.03424849, 0.008432487, -0.038693137, 0.025532039, -0.019655226, -0.022050397, 0.008926337, 0.0038859812, 0.006592896, 0.017025474, 0.023544293, 0.03822398, -0.030939694, -0.060447227, -0.020482425, -0.04395264, -0.025272768, -0.0328904, -0.020124383, 0.028865525, -0.029729763, -0.014259915, 0.039853685, -0.084003866, -0.02332206, -0.005725572, 0.024976458, -0.010914083, 0.0572372, -0.06296586, -0.035976965, -0.04723674, 0.02980384, -0.007389229, -0.02990261, -0.039804302, -0.0030726723, -0.0065064724, -0.044890955, 0.009043626, 0.033384252, -0.04266863, -0.0116857225, -0.034816418, -0.013124061, -0.07857151, 0.016161237, -0.034939878, -0.008679411, -0.022643017, -0.053335786, -0.04039692, 0.023309715, -0.015667388, -0.03940922, -0.040446304, -0.021655317, 5.796949e-05, -0.025075227, -0.045483574, 0.044792183, -0.05447164, -0.0056360615, -0.010704196, -0.03889068, -0.013087022, -0.0030757587, -0.050150454, 0.0140129905, -0.011401759, 0.004000184, 0.08494218, 0.021754088, 0.019074952, -0.024852995, 0.016432855, -0.0080497535, 0.009080664, -0.027655594, 0.015877273, 0.007364536, 0.03997715, -0.040347535, -0.0031019945, 0.029877918, 0.015136499, 0.029211221, -0.017124245, -0.016062468, 0.03217432, -0.06439803, 0.043508176, 0.023260329, -0.022951674, -0.010222693, -0.02470484, 0.020840464, -0.0042718016, -0.01871691, -0.05234809, -0.014469801, 0.024136912, -0.017469939, 0.017790942, 0.040149994, -0.0013866379, -0.06148431, 0.025828348, -0.061434925, 0.0319027, 0.0013488275, -0.032001473, -0.042199474, 0.025124613, 0.019889804, 0.014889574, 0.026890125, -0.01806256, 0.018815681, -0.0011119338, 0.034100335, -0.034297876, 0.043285944, 0.016198276, 0.055311188, -0.013988297, -0.033236098, 0.06755866, 0.0067225313, 0.021223199, -0.0421007, 0.0024028884, -0.0106054265, 0.05049615, -0.044174872, -0.02753213, 0.044125486, -0.026816048, -0.018630486, -0.010648638, 0.020210806, -0.010846178, 0.019420646, -0.026569124, 0.03773013, -0.001257774, -0.046298426, -0.020754041, -0.028667986, -0.015247615, 0.016408162, 0.026964204, -0.009759708, -0.03701405, -0.040940154, -0.010475791, -0.039261065, -0.0034816416, 0.01342037, 0.0005231722, -0.012753673, 0.038742524, 0.023927027, 0.00667932, 0.021149121, 0.020062651, -0.024581378, -0.037952363, -0.026322199, 0.024186298, -0.039927762, 0.0018257013, -0.03234717, 0.024927072, 0.0065064724, 0.022840558, 0.016531624, 0.016235314, 0.005565071, 0.029334683, 0.025828348, 0.0043335
|
|||
|
"What is RAG
|
|||
|
Retrieve information to Augment the model’s knowledge and Generate the output
|
|||
|
“What is yourreturn policy?”
|
|||
|
ask
|
|||
|
result
|
|||
|
search
|
|||
|
LLM
|
|||
|
return information
|
|||
|
Total refunds: 0-14 days
|
|||
|
% of value vouchers: 14-30 days
|
|||
|
$5 discount on next order: > 30 days
|
|||
|
“You can get a full refund upto 14 days after thepurchase, then up to 30 daysyou would get a voucher forhalf the value of your order”
|
|||
|
KnowledgeBase / Externalsources
|
|||
|
|
|||
|
RAG stands for ""Retrieve information to Augment the model’s knowledge and Generate the output."" This process involves using a language model (LLM) to enhance its responses by accessing external information sources.
|
|||
|
Here's how it works:
|
|||
|
. **User Query**: A user asks a question, such as ""What is your return policy?""
|
|||
|
. **LLM Processing**: The language model receives the question and initiates a search for relevant information.
|
|||
|
. **Information Retrieval**: The LLM accesses a knowledge base or external sources to find the necessary details. In this example, the information retrieved includes:
|
|||
|
- Total refunds available from 0 to 14 days.
|
|||
|
- 50% value vouchers for returns between 14 to 30 days.
|
|||
|
- A $5 discount on the next order for returns after 30 days.
|
|||
|
. **Response Generation**: The LLM uses the retrieved information to generate a coherent response for the user. For instance, it might say, ""You can get a full refund up to 14 days after the purchase, then up to 30 days you would get a voucher for half the value of your order.""
|
|||
|
This method allows the model to provide accurate and up-to-date answers by leveraging external data sources.","[-0.018389475, 0.030965596, 0.0056745913, 0.011064358, -0.013730029, -0.013868789, -0.015745712, 0.018520933, -0.0054445406, 0.049457315, -0.0035311005, -0.061755914, -0.033068918, -0.027752185, -0.016958045, -0.01268567, -0.01999618, -0.03254309, -0.043877665, 0.07443428, -0.013372171, -0.008391384, -0.026685916, -0.0053130826, -0.017849037, -0.029490348, 0.008405991, 0.005199883, 0.004454956, -0.020448979, 0.043965302, -0.025999416, -0.0056125144, -0.012415451, 0.005042864, 0.021778163, 0.0017545953, 0.010918294, 0.013686209, 0.0068905754, -0.034237433, -0.0024885677, -0.00863239, 0.016870407, 0.0054518436, 0.046039414, -0.007043943, -0.018331049, 0.020186063, 0.02748927, -0.020872565, -0.02744545, -0.016753556, 0.01897373, -0.02309274, 0.0063903057, 0.021062447, -0.004571807, 0.03473405, -0.039262038, -0.025152244, -0.036837373, -0.025006179, -0.0045827623, -0.012503089, 0.0008060914, -0.043030493, 0.07168827, -0.028511718, 0.00567094, 0.0026766253, -0.037158716, 0.0054554953, -0.029534167, -0.02418822, 0.01979169, 0.06958495, 0.035318308, 0.02063886, -0.026525246, 0.041540638, -0.0012689321, 0.012649153, 0.013204197, 0.027416237, 0.011327273, -0.022508483, -0.013481719, -0.04898991, -0.031988043, -0.022829823, 0.03464641, -0.007427361, 0.0690007, 0.027255567, -0.0016769988, -0.042972066, -0.017586121, 0.019645626, 0.024991572, -0.012751399, -0.05789982, 0.04951574, -0.028044313, 0.022157928, -0.0023589358, -0.05281679, 0.012897463, -0.016958045, -0.056205478, -0.09459113, -0.016665917, -0.031491425, -0.02594099, -0.013489023, 0.0021672265, -0.10715265, -0.014365408, -0.0003179177, -0.01054583, -0.047178715, 0.009048673, 0.005349599, -0.08080268, 0.029402709, 6.943752e-05, 0.04519224, -0.019002944, 0.01325532, 0.011772769, 0.052466236, 0.015833352, 0.017659154, -0.02655446, -0.07601178, 0.010896384, -0.0036844676, -0.029242039, -0.07431743, 0.015073818, -0.02667131, 0.0077925213, -0.038531717, 0.012327813, -0.05459877, -0.0034032941, -0.020653468, 0.0003975683, -0.03899912, 0.010136851, -0.0603537, 0.03452956, -0.024918541, 0.037158716, 0.015380553, -0.031403787, 0.01649064, 0.010107638, -0.016256938, -0.034850903, -0.0103705535, 0.06572886, 0.021413002, -0.000994149, 0.0077925213, 0.032572303, -0.079400465, 0.012386238, -0.058016673, -0.020872565, -0.031082448, -0.043351833, -0.008800364, -0.060645826, -0.016534459, -0.02263994, 0.025780318, -0.015731107, 0.03379924, -0.03873621, -0.05538752, 0.00961102, -0.03543516, -0.04723714, -0.009808206, -0.028365655, -0.0058097006, 0.007003775, -0.036632884, -0.0016870407, 0.0055942563, 0.045163028, 0.0539853, 0.024275858, -0.01901755, 0.010377857, 0.01906137, -0.034412708, 0.017323205, -0.015249095, 0.020653468, 0.0346172, 0.05448192, -0.07168827, -0.044082154, 0.05912676, -0.0024630064, 0.039086763, -0.010487405, 0.0023826712, 0.04308892, -0.001564712, -0.01056774, 0.027357811, -0.03450035, 0.017513089, -0.07349947, 0.03648682, 0.0002091684, 0.0034745005, 0.0046448396, 0.008625087, 0.011086267, 0.030994808, -0.033448685, 0.03473405, 0.06385924, -0.023530932, 0.034587987, -0.027635334, -0.00091153145, 0.026393788, -0.0157165, -0.057520054, 0.050830316, -0.001095481, 0.0035767455, 0.015994022, 0.0011904227, -0.04247545, 0.024290465, 0.01767376, -0.0081065595, 0.015497404, 0.02797128, 0.016665917, -0.021778163, -0.03181277, 0.0669558, -0.023896093, -0.005696501, -0.030206062, 0.029300464, -0.103647105, -0.031199299, 0.019411923, -0.016446821, 0.038911484, -0.023165772, -0.036311544, 0.009859329, -0.011509853, -0.005795094, 0.015249095, 0.023560144, 0.0022347812, 0.0015747539, -0.01771758, -0.023647783, 0.008325655, -0.052904427, -0.0040459763, 0.026934225, -0.0028847666, -0.04361475, 0.010940203, 0.00349641, 0.0069124848, 0.0035146682, 0.009742478, -0.009399227, -0.019806296, 4.8012877e-05, 0.0023808454, 0.009333498, 0.023487112, 0.0051962314, 0.025707288, -0.005915597, 0.0064012604, 0.0017354245, -0.02878924, 0.04127772, -0.025152244, -0.0002987468, -0.0058097006, 0.
|
|||
|
"When to use RAG
|
|||
|
Good for ✅
|
|||
|
Not good for ❌
|
|||
|
●
|
|||
|
●
|
|||
|
Introducing new information to the model
|
|||
|
●
|
|||
|
Teaching the model a specific format, style,
|
|||
|
to update its knowledge
|
|||
|
Reducing hallucinations by controlling
|
|||
|
content
|
|||
|
/!\ Hallucinations can still happen with RAG
|
|||
|
or language
|
|||
|
➔ Use fine-tuning or custom models instead
|
|||
|
●
|
|||
|
Reducing token usage
|
|||
|
➔ Consider fine-tuning depending on the use
|
|||
|
case
|
|||
|
|
|||
|
**Good for:**
|
|||
|
- **Introducing new information to the model:** RAG (Retrieval-Augmented Generation) is effective for updating a model's knowledge by incorporating new data.
|
|||
|
- **Reducing hallucinations by controlling content:** While RAG can help minimize hallucinations, it's important to note that they can still occur.
|
|||
|
**Not good for:**
|
|||
|
- **Teaching the model a specific format, style, or language:** For these tasks, it's better to use fine-tuning or custom models.
|
|||
|
- **Reducing token usage:** If token usage is a concern, consider fine-tuning based on the specific use case.","[-0.008419483, 0.021529013, -0.0060885856, 0.017870212, -0.026854761, -0.016810713, -0.008765586, 0.011866385, -0.0004820719, 0.0467027, 0.006392309, -0.028987885, -0.028083779, 0.043142788, 0.0032579585, -0.03698357, -0.03494933, -0.04523353, -0.039017804, 0.036785793, -0.012424388, 0.02196694, -0.004845441, 0.022094078, 0.009302398, 0.014387992, 0.03348016, 0.044922743, 0.032547798, 0.031389415, 0.006770197, -0.02706666, -0.027970765, -0.05156227, 0.014126649, 0.026755873, 0.010630303, -0.02390229, -0.0015654094, 0.00033903957, 0.00786148, -0.0029401088, -0.011562662, 0.051194977, 0.020540148, 0.037124835, 0.0031325845, -0.0096767545, -0.028352184, 0.025456222, -0.06876853, -0.0036058272, -0.011944082, 0.018534163, -0.02534321, -0.0017234512, -0.020003336, -0.02154314, 0.030739589, -0.011054103, 0.007296414, -0.03305636, 0.008193457, 0.012643351, -0.03845274, 0.006900868, -0.07413665, -0.027716486, -0.040628243, 0.03418649, 0.028860744, -0.041221563, 0.00036508558, 0.0043651345, -0.05842782, 0.00038980722, 0.02989199, 0.043312307, 0.019975081, -0.022969931, 0.0070562614, -0.0040084366, -0.016556432, -0.04178663, 0.002226713, 0.01332143, -0.021783292, -0.04153235, -0.03955462, -0.055263452, -0.014945995, 0.049923576, -0.03469505, 0.014041889, -0.015977241, 0.014493942, -0.025201943, 0.020031588, 0.023690391, 0.042605974, 0.012480894, -0.04427292, 0.0039554616, -0.022630893, 0.052381616, -0.016005494, -0.034582037, 0.04531829, -0.009104625, -0.014564576, -0.06633875, -0.03427125, -0.07385412, 0.022023447, -0.024100063, -0.05354, -0.05797577, -0.010255948, 0.05240987, -0.00014501889, 0.0043262863, -0.018124491, 0.005618875, -0.047832835, 0.014903615, -0.026925392, 0.06057507, -0.0045240596, 0.011612105, -0.016768333, 0.056817383, 0.021825673, 0.022842791, -0.02322421, -0.06707333, -0.025060676, -0.015454554, 0.0054528867, -0.07125482, 0.03941335, 0.018520037, -0.023252465, -0.018703684, 0.0081369495, -0.04257772, 0.005869623, -0.041617107, 0.023761025, -0.013441507, 0.03941335, -0.070124686, 0.031926226, -0.015454554, -0.015186148, 0.0040155, -0.019367635, -0.00012923677, -0.012339628, 0.00021598322, -0.077753074, 0.004502869, 0.058371313, 0.034582037, -0.05978398, 0.0009235297, 0.008440672, -0.061874725, 0.029157404, -0.013759356, 0.009754451, 0.004174425, -0.046476677, -0.04523353, -0.051675282, -0.024523864, 0.014804728, -0.017615931, -0.015652327, 0.04574209, 0.0043156915, -0.032604307, 0.038480993, -0.061027125, 0.028225046, -0.02660048, -0.030626575, -0.03740737, -0.0048242505, -0.051788297, -0.005113847, -0.027603472, 0.015285035, 0.08238662, 0.03418649, 0.007045666, -0.009952225, 0.045290038, 0.0031979203, -0.0029524697, -0.049951833, -0.02196694, 0.009796831, 0.0028500515, -0.06871202, -0.027476333, -0.0061239023, -0.009690882, 0.01652818, -0.016556432, -0.009033992, -0.00025847353, -0.026190808, -0.00016190464, 0.023619758, -0.030598322, -0.0028712414, -0.042097416, 0.030937362, 0.010333644, -0.0036446755, -0.03186972, -0.01926875, 0.009436602, 0.03958287, -0.04469672, 0.038707018, 0.072837, -0.0445272, 0.04961279, -0.04729602, 0.029863736, 0.014190219, -0.033932213, -0.030965615, 0.036531515, -0.0067278165, -0.002793545, -0.0007601903, -0.03229352, 0.008906852, 0.020752048, -0.0060532694, -0.038650513, -0.036475006, -0.028196791, 0.023181831, -0.040260952, -0.042945012, 0.04873694, 0.018265758, 0.027843626, -0.019819688, -0.014832982, -0.039441604, 0.0020254084, -0.013589837, 0.021317113, 0.0038530435, -0.06125315, -0.0008392113, -0.009464855, 0.015948987, 0.030005002, -0.0061415606, -0.018364644, 0.014126649, 0.008426546, -0.014564576, -0.012876441, -0.01990445, -0.026176682, -0.020822681, 0.023323098, -0.011788689, -0.031050375, 0.02621906, 0.014169029, 0.008320596, -0.048595674, -0.005668318, -0.028620591, -0.01918399, 0.055093933, 0.02946819, -0.0130671505, 0.045177024, 0.0436796, 0.0020095159, 0.007444744, -0.008815029, 0.032773826, -0.06407848, 0.03856575, -0.016090253, -0.038820032, 0.02453799
|
|||
|
"Technical patterns
|
|||
|
Data preparation
|
|||
|
Input processing
|
|||
|
Retrieval
|
|||
|
Answer Generation
|
|||
|
● Chunking
|
|||
|
●
|
|||
|
●
|
|||
|
Embeddings
|
|||
|
Augmentingcontent
|
|||
|
●
|
|||
|
Inputaugmentation
|
|||
|
● NER
|
|||
|
●
|
|||
|
Search
|
|||
|
● Context window
|
|||
|
● Multi-stepretrieval
|
|||
|
● Optimisation
|
|||
|
●
|
|||
|
Safety checks
|
|||
|
●
|
|||
|
Embeddings
|
|||
|
● Re-ranking
|
|||
|
","[-0.0034501953, 0.03871357, 0.07771268, 0.004146183, 0.017548408, 0.0052377535, 0.010808629, 0.04906416, -0.03121832, 0.042830013, 0.06591063, -0.009910389, -0.017239079, -0.009981772, -0.008560054, -0.01406252, -0.009981772, 0.0214388, -0.012694339, 0.047160603, 0.041711673, -0.034906458, -0.008500568, 0.004657764, 0.027173262, 0.023306664, -0.00617466, 0.08389924, 0.012111375, -0.020522714, 0.007507149, -0.025840774, -0.01093355, 0.00840539, 0.050349057, 0.0055262614, -0.025293501, 0.011605743, -0.0063471696, 0.017441332, 0.035453733, -0.02833919, -0.015157065, 0.03186077, 0.0075666355, 0.0048094536, -0.036262743, -0.0069836713, -0.03709555, 0.07085987, -0.021581568, 0.019249711, -0.0027214903, 0.009880646, -0.0009398808, 0.004387102, -0.05582178, -0.005660105, 0.02410378, 0.016834574, 0.01684647, -0.028101247, 0.005163396, -0.002397291, -0.039641555, -0.014847738, -0.020951014, -0.016786985, -0.010642068, 0.033645354, 0.02795848, 0.00741792, 0.016965443, -0.024413107, 0.027625358, 0.010124539, 0.01007695, 0.01397924, 0.014776354, -0.04454321, 0.03619136, -0.023604095, 0.0021727309, -0.062341463, -0.0031676362, 0.01518086, -0.038309067, 0.004845145, -0.041664083, -0.039736733, -0.07538082, -0.0030724586, -0.039689142, 0.009321476, 0.044781156, 0.023675479, 0.0054994924, 0.029981008, 0.013860268, 0.042282738, 0.020296667, -0.04818376, -0.055250715, -0.02843437, 0.06752865, -0.03009998, -0.04566155, 0.013134537, -0.039903294, -0.02641184, -0.09579646, -0.017024929, -0.05763016, -0.016204022, 0.058724705, -0.022842674, 0.008607643, -0.026316663, -0.009577267, 0.0077807857, -0.024960378, 0.022925954, -0.0043841274, -0.031194525, -0.023033028, -0.019416273, -0.0038993156, -0.005175293, 0.0014232056, -0.004622072, 0.016584732, 0.007988987, 0.042568274, -0.013170228, -0.01706062, -0.017024929, -0.0385946, 0.011647384, -0.03371674, 0.01882141, 0.047446135, -0.02512694, -0.0044882284, 0.045209456, -0.054346524, -0.02285457, -0.03219389, 0.03661966, -0.0041194144, 0.01406252, -0.032122508, -0.04275863, -0.05972407, 0.032860138, 0.009238196, -0.018071886, -0.017227182, 0.015989872, -0.016358685, -0.022461962, -0.0029653835, -0.045613963, -0.013455762, 0.012022146, -0.010909756, -0.01676319, -0.057963282, 0.013562837, -0.03550132, -0.033669148, -0.034620926, -0.07671331, -0.011926969, 0.0227237, -0.0019481707, -0.045685347, -0.040855072, -0.006359067, -0.021450698, -0.0152998315, -0.044947717, 0.05153878, -0.04175926, 0.0069836713, -0.019582832, -0.04777926, -0.01938058, 0.014098212, -0.053442337, 0.016096946, -0.027649151, 0.009214401, 0.05111048, 0.014633588, 0.012230348, -0.033859503, 0.038642187, -0.043282107, 0.024115676, -0.013539042, 0.03400227, 0.0042294636, 0.007834323, 0.032098714, 0.014264774, -0.003378812, -0.025674213, 0.017905325, -0.011593847, -0.04661333, 0.040117443, -0.022331093, 0.06067585, 0.047874436, -0.085564844, 0.008102011, -0.034787487, -0.00093170145, -0.03785697, -0.019737497, -0.030218953, -0.01192102, 0.033597764, 0.024793819, -0.0053418544, 0.048278943, 0.013301098, -0.040188827, 0.0054102633, -0.07000327, 0.020272871, -0.0012744903, -0.01496671, 0.0072454102, -0.024246546, 0.005556004, 0.01689406, 0.0018871974, -0.027268441, 0.0118377395, 0.0075487895, 0.02234299, -0.01895228, 0.03288393, -0.015228448, 0.041902028, 0.0009019584, -0.020225283, 0.07062193, -0.017346155, 0.03421642, -0.07618983, 0.025959745, -0.023639787, 0.039736733, -0.035096817, -0.007965192, 0.053061627, -0.025721801, 0.0035364502, -0.01676319, 0.019713702, -0.012361217, 0.045042895, -0.0248652, 0.010838373, 0.0065196794, 4.2918313e-05, -0.016061254, -0.074666984, -0.020832041, 0.01560916, 0.036857605, 0.023378048, -0.057344627, -0.02779192, -0.0058861524, -0.047493722, -0.016739396, 0.010606376, -0.048469298, -0.011742561, 0.046589535, 0.03276496, 0.023044925, 0.013824576, 0.019999236, -0.050967712, -0.014800148, -0.013991137, 0.03176559, -0.03352638, 0.002367548, -0.027244646, 0.010529044, -0.0022902158, 0.00091831706, -0.00759043, 0.017048724, -0.048826214, 0.023830142, 0.008167446, 0.025626624, 0.0055173384, 0.009297682, 0.
|
|||
|
"Technical patterns
|
|||
|
Data preparation
|
|||
|
chunk documents into multiplepieces for easier consumption
|
|||
|
content
|
|||
|
embeddings
|
|||
|
.983, 0.123, 0.289…
|
|||
|
.876, 0.145, 0.179…
|
|||
|
.983, 0.123, 0.289…
|
|||
|
Augment contentusing LLMs
|
|||
|
Ex: parse text only, ask gpt-4 to rephrase &summarize each part, generate bullet points…
|
|||
|
BEST PRACTICES
|
|||
|
Pre-process content for LLMconsumption:Add summary, headers for eachpart, etc.
|
|||
|
+ curate relevant data sources
|
|||
|
KnowledgeBase
|
|||
|
COMMON PITFALLS
|
|||
|
➔ Having too much low-quality
|
|||
|
content
|
|||
|
➔ Having too large documents
|
|||
|
","[-0.0024594103, 0.023041151, 0.053115055, -0.00151447, 0.034315445, -0.022247573, 0.010993804, 0.026051277, -0.013572935, 0.044960346, 0.04624649, -0.009228774, -0.021755006, -0.02040045, 0.013066687, 0.033084027, 0.03291984, 0.0006396519, -0.009851323, 0.039514754, 0.04657487, 0.0011065636, 0.007285875, 0.018621739, 0.0010509789, 0.01017286, 0.004498087, 0.04750527, -0.0002646688, -0.028842486, 0.031332683, -0.017294547, -0.009570834, -0.009071427, 0.035820507, 0.04925662, -0.0025722901, 0.038392797, 0.010508078, 0.015433741, 0.014051818, -0.020783557, -0.003126427, 0.028007861, 0.012492025, -0.021057205, 0.017007215, 0.018868022, -0.002028415, 0.066605896, -0.028733028, 0.012416773, 0.011766858, -0.0013477158, 0.0057876525, -0.015433741, -0.04487825, -0.0021122196, 0.0006854024, 0.006085245, 0.010555967, -0.006851459, 0.034589093, 0.01457175, -0.06354104, -0.05234884, -0.06233699, -0.042223867, -0.011342704, 0.04389312, 0.041676573, 0.016323095, 0.0065230816, -0.0071627335, 0.037818138, -0.0014298102, -0.019921565, -0.006081824, 0.0061023477, -0.03790023, 0.021645548, 0.0071285274, -0.011924206, -0.054674845, -0.022083383, -0.019059574, -0.009960783, 0.01977106, -0.057301868, -0.0505154, -0.040198874, 0.0065470254, -0.06868562, -0.010309684, 0.051801544, -0.009577676, -0.011075898, 0.034452267, 0.008961968, 0.07804438, 0.010501238, -0.0088867145, -0.04788838, -0.029006675, 0.046273857, -0.018881705, -0.037024558, -0.021809736, -0.06031199, -0.017226133, -0.07618357, -0.014174961, -0.056535654, 0.014092865, 0.052266747, -0.049010336, -0.031743154, 0.028760392, -0.007976836, 0.0013297576, -0.039815765, 0.005572155, -0.0062425924, -0.011985777, -0.00605788, -0.048107296, 0.03571105, -0.0013237717, 0.023082199, -0.0216045, 0.05212992, 0.007853694, 0.07870113, -0.042880625, -0.014845397, 0.002926322, -0.022110749, 0.0544012, -0.02131717, -0.002840807, 0.052622486, -0.013689235, 0.014982222, 0.06261063, -0.03136005, 0.0026099167, -0.028733028, 0.016884074, -0.015310599, 0.021453993, -0.024423074, -0.027255328, -0.0533887, 0.0033299527, 0.0049222414, -0.016555697, -0.001120246, -0.031168494, -0.019223763, -0.03631307, 0.017581876, 0.0018813292, 0.0016128122, 0.024081014, -0.0058971117, 0.040499885, -0.047122166, -0.02189183, -0.071476825, -0.040554617, -0.0011997749, -0.07596465, 0.0062323306, -0.020564638, -0.004898297, -0.03149687, -0.08313423, -0.012793038, -0.013326651, -0.019442681, -0.028048908, 0.016733568, -0.08154707, -0.013620824, -0.05018702, -0.038283337, -0.016418872, 0.023533717, -0.028432015, 0.00059988745, -0.007395334, 0.0137644885, 0.06463563, -0.011281134, 0.024614627, -0.0007995649, 0.04925662, 0.0127725145, 0.0133676985, 0.022028655, -0.004145765, 0.035410035, -0.019127987, -0.0063759955, 0.0016726727, 0.0031007726, 0.0015760408, 0.042388055, -0.044166766, -0.058560647, 0.022849599, 0.010248113, 0.05087114, 0.031743154, -0.026379656, -0.010425984, -0.02532611, 0.030758021, -0.01863542, 0.03412389, -0.015036951, -0.035984695, 0.03748976, 0.041074548, -0.03218099, 0.024929322, 0.009365599, -0.072845064, 0.014161278, -0.056699842, 0.042880625, -0.0012074712, -0.023424258, -0.004019203, -0.016008401, -0.011452164, 0.010720156, 0.028951947, -0.04137556, 0.0042449627, 0.027186917, 0.032700922, -0.031141128, 0.009557152, -0.026106007, 0.023985237, -0.018567009, -0.026489114, 0.052896135, 0.011157992, 0.046957977, -0.05297823, -0.0063657337, -0.0179513, 0.019907882, -0.04531609, 0.0017043132, 0.017185086, -0.014708574, 0.0043236366, -0.032564096, 0.07618357, -0.013121416, 0.007538999, -0.029444512, 0.03040228, -0.016884074, -0.0053634983, -0.00422786, -0.057137676, -0.005931318, 0.012622008, 0.028705662, 0.0030101268, -0.059928887, -0.029636065, -0.020660415, -0.018553326, -0.014653844, -0.009919736, -0.028377285, -0.022616997, 0.031743154, 0.010008671, 0.026023913, -0.005835541, 0.01446229, 0.013271922, -0.00063067285, 0.016446238, 0.014612797, -0.029335054, 0.03223572, -0.03149687, -0.005250619, 0.0061160303, -0.017417688, -0.033631325, -0.003509534, -0.054209646, -0.00096717424, 0.00041538893, 0.024724087,
|
|||
|
"Technical patterns
|
|||
|
Data preparation: chunking
|
|||
|
Why chunking?
|
|||
|
If your system doesn’t requireentire documents to providerelevant answers, you canchunk them into multiple piecesfor easier consumption (reducedcost & latency).
|
|||
|
Other approaches: graphs ormap-reduce
|
|||
|
Things to consider
|
|||
|
●
|
|||
|
Overlap:
|
|||
|
○
|
|||
|
○
|
|||
|
Should chunks be independent or overlap oneanother?
|
|||
|
If they overlap, by how much?
|
|||
|
●
|
|||
|
Size of chunks:
|
|||
|
○ What is the optimal chunk size for my use case?
|
|||
|
○
|
|||
|
Do I want to include a lot in the context window orjust the minimum?
|
|||
|
● Where to chunk:
|
|||
|
○
|
|||
|
○
|
|||
|
Should I chunk every N tokens or use specificseparators?Is there a logical way to split the context that wouldhelp the retrieval process?
|
|||
|
● What to return:
|
|||
|
○
|
|||
|
○
|
|||
|
Should I return chunks across multiple documentsor top chunks within the same doc?
|
|||
|
Should chunks be linked together with metadata toindicate common properties?
|
|||
|
","[-0.0070627443, 0.021766542, 0.085392766, 0.018591998, 0.03250831, 0.025962353, 0.033886407, 0.030195078, -0.024116687, 0.05837223, 0.038955834, -0.015048321, -0.036937907, 0.0038205264, 0.010944793, 0.019096479, 0.026749836, 0.020191574, -0.00062983314, 0.033246577, 0.021520453, 0.0016180329, -0.02645453, 0.016512549, 0.011006315, 0.0030591895, -0.001961019, 0.07505704, 0.025593221, -0.035436768, -0.0071242666, -0.014802232, -0.011566167, -0.018407432, 0.03186848, -0.00019023806, -0.04532953, 0.03297588, -0.007358051, 0.012150628, 0.010680248, 0.01648794, 0.0012004513, 0.040629238, 0.022443285, 0.0076964227, -0.00732729, -0.008483906, -0.027955672, 0.06614863, -0.0031037931, 0.0049648387, -0.01712777, -0.01335031, 0.02537174, 0.0022101838, -0.06757595, -0.011037076, 0.047273632, -0.006576719, 0.010114244, -0.037503913, 0.02179115, 0.04035854, -0.032163788, -0.017226206, -0.04820877, -0.034821544, -0.008170144, 0.052367665, 0.052220013, 0.010341876, 0.016647898, 0.019785527, 0.023378422, 0.009185259, -0.027931063, 0.013227265, -0.015774284, -0.017435381, 0.0057307896, -0.027980281, 0.013276483, -0.043853, 0.0019225676, -0.009591306, -0.02070836, 0.0041342895, -0.030859517, -0.028964635, -0.041465938, 0.030441167, -0.05532073, 0.0013604088, 0.05271219, -0.012064496, -0.00916065, 0.013854791, 0.00782562, 0.006349087, -0.021508148, -0.04141672, -0.055714473, -0.028940026, 0.07658279, -0.0112954695, -0.050374348, 0.017866036, -0.039005052, -0.022640156, -0.05728944, -0.0066628503, -0.04574788, 0.0346985, 0.026085397, -0.015208279, -0.06358931, -0.022467894, 0.011147816, 0.018702738, -0.018776564, -0.002757731, -0.026429921, -0.0060937703, -0.037405476, -0.04097376, 0.010920184, -0.01590963, 0.02179115, 0.010317267, 0.062703386, 0.024879564, 0.06481975, -0.039226532, -0.021495843, -0.04011245, -0.029678293, 0.03642112, 0.0001344836, 0.00976972, 0.042794816, -0.0045864773, 0.02245559, 0.045009617, -0.03775, 0.01335031, -0.026552966, 0.04144133, -0.006422914, 0.028521676, -0.029136896, -0.042474903, -0.025642438, 0.016143415, 0.033172753, -0.022283329, 0.01965018, -0.028743155, -7.531659e-05, -0.028029498, -0.012636652, -0.016684812, -0.00398356, 0.020240791, -0.026233051, 0.0005979185, -0.023403032, 0.006742829, -0.051826272, -0.02048688, -0.022172589, -0.109460235, -0.018481258, -0.016869377, -0.0045895535, -0.020573013, -0.056748044, -0.013633312, 0.006349087, -0.015036017, -0.037183996, 0.030564211, -0.046067797, 0.0009597458, -0.009092975, -0.04899625, -0.04641232, 0.020339228, -0.022923158, 0.023599902, -0.026405312, 0.041908897, 0.019354872, -0.014359273, -0.002670062, -0.02884159, 0.03954645, -0.012421325, 0.0024270494, 0.01090788, 0.011480036, 0.031376302, -0.002613154, 0.023439944, 0.0139901405, 0.009425196, -0.014260838, 0.016721724, -0.019281046, -0.085097454, -0.0003454854, -0.010754074, 0.04055541, 0.04075228, -0.05404107, -0.026799055, -0.037602346, 0.012495152, 0.013559485, -0.0002903077, 0.0012911964, -0.028816981, 0.07146414, 0.053942632, 0.014187011, 0.010040417, 3.42938e-05, -0.07235006, 0.029899772, -0.051088005, 0.026380705, -0.006570567, -0.024104385, 0.004749511, -0.014999104, -0.016623288, -0.00061599066, 0.020228488, -0.06354009, -0.0053062867, -0.007413421, 0.017779905, -0.029629074, 0.018259779, -0.022111066, 0.021803455, -0.05290906, -0.027463494, 0.0455264, -0.0035682856, 0.028940026, -0.06659159, 0.0013757894, -0.007130419, 0.017090857, -0.03206535, -0.0056969523, 0.047913462, -3.511089e-05, -0.016081894, -0.021864977, 0.035461374, -3.8571514e-05, 0.029604465, -0.027389668, 0.005656963, -0.002783878, -0.013411832, -0.01593424, -0.04121985, 0.008145534, 0.014691493, 0.016844768, -0.003722091, -0.054287158, -0.04535414, -0.0018671977, -0.016204938, -0.032902054, -0.004121985, -0.03167161, -0.013867096, 0.03600277, 0.009289847, 0.048036505, -0.017226206, 0.014765319, 0.008403928, 0.027045144, -0.0077087274, 0.04033393, -0.013030394, 0.014408491, -0.02115132, 0.008490059, -0.00014082808, -0.021446627, -0.025691656, 0.008526972, -0.07210398, -0.0013742513, -0.0011366219, 0.027734192, 0.011338535, 0
|
|||
|
"Technical patterns
|
|||
|
Data preparation: embeddings
|
|||
|
What to embed?
|
|||
|
Depending on your use caseyou might not want just toembed the text in thedocuments but metadata as well- anything that will make it easierto surface this specific chunk ordocument when performing asearch
|
|||
|
Examples
|
|||
|
Embedding Q&A posts in a forum
|
|||
|
You might want to embed the title of the posts,the text of the original question and the content ofthe top answers.
|
|||
|
Additionally, if the posts are tagged by topic orwith keywords, you can embed those too.
|
|||
|
Embedding product specs
|
|||
|
In additional to embedding the text contained indocuments describing the products, you mightwant to add metadata that you have on theproduct such as the color, size, etc. in yourembeddings.
|
|||
|
","[-0.008976573, 0.02953352, 0.03814152, 0.029010382, 0.023933565, -0.020105146, 0.02073529, 0.0121748485, -0.008500993, 0.034503333, 0.034717344, -0.013851268, -0.02974753, -0.019165875, 0.013613478, 0.036191642, -0.0007256311, 0.021258427, -0.018167157, 0.02953352, 0.05098218, 0.0038254468, -0.047082424, 0.06406063, -0.0009095468, -0.011378252, -0.011925169, 0.064536214, 0.045845915, -0.0039651487, 0.0036292702, -0.016633412, -0.008168087, -0.008001634, 0.009725612, -0.0042594136, -0.0064262752, 0.029866425, 0.012436418, -0.00565643, 0.033766184, -0.0038462535, -0.020568836, 0.024123797, -0.016241059, 0.0068721315, -0.03526426, -0.017323002, -0.020854184, 0.07200282, 0.02882015, -0.0008909695, 0.015610915, -0.0121272905, 0.0021713201, -0.03616786, -0.050601717, 0.025538648, -0.004244552, 0.015385014, 0.013851268, -0.026775155, 0.026489807, 0.022435488, -0.029652415, -0.019356107, -0.06044622, -0.005139237, -0.040352967, 0.05954262, 0.07946942, 0.015456351, -0.0018176074, 0.022685168, 0.023755223, -0.005347303, -0.027678758, 0.061349824, -0.014243622, -0.042778425, 0.0011696296, 0.000637946, -0.047462888, -0.014968881, -0.06653365, 0.011574429, -0.009731556, 0.008072971, -0.05792565, -0.042564414, -0.07547455, -0.01452897, -0.051172413, -0.028392129, 0.041375462, 0.06391796, -0.030342007, 0.0011733451, -0.018143378, 0.019225324, -5.401363e-05, -0.023148859, -0.06548737, -0.024872836, 0.043753363, -0.03956826, 0.0057247947, 0.0021653753, -0.03426554, -0.02786899, -0.03859332, -0.010938341, -0.029200613, 0.04327778, 0.031554736, -0.034003973, -0.043325342, -0.026727598, -0.010397368, 0.003415259, -0.052123573, 0.0090657445, -0.0034093144, -0.014873765, -0.00963644, -0.0380464, -0.05687937, -0.047986027, -0.017834252, -0.02594289, 0.028083, -0.010896727, 0.070195615, -0.041090116, -0.03614408, -0.020117035, -0.02546731, 0.043396678, -0.007026695, -0.014659755, 0.022138251, -0.040376745, 0.015099666, 0.019344218, -0.058971923, -0.015325567, -0.013447026, 0.026323356, 0.006741347, 0.006123093, -0.037570823, -0.01034981, -0.043254003, 0.014362517, 0.03402775, 0.0017566738, 0.022185808, -0.029557299, 0.019260991, -0.012674208, -0.015278009, -0.008851733, 0.00703264, -0.010468706, -0.019344218, -0.0024953089, -0.00015094093, -0.023291532, -0.03550205, -0.010219026, -0.017988814, -0.075902574, -0.00882201, -0.020188373, -0.031768747, -0.014374406, -0.025705101, -0.068626195, -0.0065332805, -0.004800386, -0.035787396, -0.00667001, -0.038212854, -0.0074666063, -0.021187091, 0.0004737223, -0.05079195, 0.017120881, -0.019153986, 0.02499173, -0.030770028, 0.0077757337, 0.04387226, -0.04377714, -0.007080198, -0.015527688, 0.036096524, -0.015147224, 0.0006661836, 0.0011287595, 0.04306377, 0.03143584, -0.018167157, 0.029509742, -0.014909434, -0.008055137, -0.015396903, 0.016716639, -0.082560696, -0.04356313, 0.005391889, -0.0039175907, 0.022863511, 0.039758492, -0.032743685, 0.019950582, -0.03455089, -0.016205389, -0.014980771, 0.016205389, -0.022970516, -0.011223689, 0.0614925, 0.017215997, -0.030413343, 0.03645321, -0.03245834, -0.060874246, -0.003739248, -0.022661388, 0.039140236, -0.0029277897, 0.028725034, -0.008019469, 0.015813036, 0.019225324, -0.016859312, 0.031483397, -0.041755926, 0.0020464803, -0.0010395882, 0.042017497, 0.0017596461, 0.02739341, -0.034669783, 0.019189654, -0.011711159, -0.053930774, 0.012828771, 0.008536662, 0.025871554, -0.03186386, -0.002290215, -0.015456351, 0.03145962, -0.056308676, -0.05240892, 0.027322073, 0.0030882978, -0.026894052, -0.0032131376, 0.023624439, -0.012317522, 0.012139181, -0.0010767429, -0.012258075, -0.004794441, -0.04501365, 0.0041286293, -0.057497624, 0.015349345, -0.0025369222, 0.008881457, 0.01665719, -0.059257273, -0.022958627, -0.03164985, 0.002306563, 0.010260639, 0.008423711, -0.0019751433, -0.024207024, 0.016966317, 0.017953146, -0.032339443, -0.011520926, 0.0023021046, 0.021662671, -0.025681322, -0.0023452041, 0.008364264, -0.028154338, 0.04974567, -0.025514869, -0.037998844, 0.01786992, -0.0010388452, 0.012793103, 0.015741698, -0.063061915, -0.011514981, 0.0010447899, 0.03
|
|||
|
"Technical patterns
|
|||
|
Data preparation: augmenting content
|
|||
|
What does “Augmentingcontent” mean?
|
|||
|
Augmenting content refers tomodifications of the original contentto make it more digestible for asystem relying on RAG. Themodifications could be a change informat, wording, or addingdescriptive content such assummaries or keywords.
|
|||
|
Example approaches
|
|||
|
Make it a guide*
|
|||
|
Reformat the content to look more likea step-by-step guide with clearheadings and bullet-points, as thisformat is more easily understandableby an LLM.
|
|||
|
Add descriptive metadata*
|
|||
|
Consider adding keywords or text thatusers might search for when thinkingof a specific product or service.
|
|||
|
Multimodality
|
|||
|
Leverage modelssuch as Whisper orGPT-4V totransform audio orvisual content intotext.
|
|||
|
For example, youcan use GPT-4V togenerate tags forimages or todescribe slides.
|
|||
|
* GPT-4 can do this for you with the right prompt
|
|||
|
","[0.008368322, 0.06282678, 0.021398509, 0.011559803, 0.01672309, -0.021886379, -0.008849415, 0.023255125, -0.00564777, 0.014080463, 0.020178834, 0.020409217, -0.02546409, -0.015056202, -0.0059052566, 0.013775544, 0.014324398, -0.010888982, -0.01126166, 0.047513094, 0.02553185, -0.005617278, 0.0042688604, 0.03859592, 0.015747352, -0.006081432, -0.027076771, 0.06515771, 0.027307155, -0.007555205, 0.0077110524, -0.009222093, -0.0057968413, -0.027727263, 0.05407223, 0.011864721, -0.00695892, 0.016059047, 0.013640025, -0.0048854733, 0.023038294, -0.02490846, 0.003645471, 0.055129282, 0.0025613161, 0.0014238004, 0.0014991831, -0.010590839, -0.018051181, 0.06239312, -0.023512611, -0.008347994, 0.025193052, -0.011166796, -0.0227266, -0.011796962, -0.051443156, 0.0014475163, 0.013308003, -0.0021141022, 0.015164618, -0.016140357, 0.029109562, -0.032849897, -0.07187948, -0.019203095, -0.058435954, -0.01326057, -0.040357668, 0.042797018, 0.060333226, -0.011349748, -0.018701674, 0.0016787462, -0.021303646, -0.010495976, -0.035966843, 0.0021090202, 0.029489016, -0.05881541, 0.034313504, 0.003243995, -0.035560284, -0.03818936, -0.02462387, 0.031142352, -0.044856913, -0.016695987, -0.043745656, -0.03973428, -0.018376427, 0.0064778263, -0.053882502, 0.012420351, 0.025125291, 0.03225361, -0.0321994, 0.030058198, 0.012345815, 0.05184971, 0.019148888, -0.0028543768, -0.0059967325, -0.046672873, 0.051172115, -0.03588553, -0.015232378, -0.010523079, -0.030031092, -0.0011747836, -0.047052328, -0.028594587, -0.019054024, -0.020111075, 0.048786975, -0.05686393, -0.009798051, 0.00010629801, -0.025979064, -0.017942766, -0.078709655, -0.015557624, 0.010231713, -0.0510637, 0.03593974, -0.059086446, 6.4901076e-05, -0.0072435103, 0.0054715946, -0.020395666, 0.020260146, 0.022835014, 0.047865443, -0.031250767, -0.043691445, -0.016953474, -0.016330084, 0.021506924, -0.025857097, 0.006681105, 0.067326024, -0.0010392641, 0.0040892973, 0.077408664, -0.05708076, -0.032118093, -0.017482, 0.033690117, -0.06461564, 0.031304974, -0.069765374, -0.0021327361, -0.036400504, 0.046672873, 0.02091064, -0.013511281, -0.0074671176, 0.008829087, -0.016194565, -0.05968273, 0.004478915, -0.0047702817, 0.010089417, -0.009554116, -0.012826908, 0.008029523, -0.0146496445, -0.01881009, -0.052662827, -0.024136001, -0.03279569, -0.08093217, -0.02111392, -0.0033608805, -0.0138636315, -0.007121543, -0.054234855, -0.041658655, -0.025748681, -0.019555446, -0.02316026, 0.012291607, -0.067380235, 0.012759149, -0.034584545, -0.047242053, -0.024800045, 0.015516968, -0.045697134, 0.0028763986, -0.02679218, -0.006532034, 0.073830955, 0.03282279, 0.0028933387, -0.016262325, 0.04713364, -0.027889887, 0.041360512, -0.0075416532, 0.027320705, 0.012508438, -0.008354769, -0.0025460701, -0.013660353, 0.00257148, -0.021100366, 0.024081793, -0.052310478, -0.0051226323, 0.01944703, -0.011431059, 0.001949785, 0.05827333, -0.06998221, 0.002564704, -0.059411693, 0.010380784, -0.0013780626, 0.0037640505, -0.033175144, -0.03762018, 0.012264503, 0.02854038, -0.015828663, 0.029597431, 0.0067251488, -0.043772757, 0.015693143, -0.03973428, 0.052500207, -0.012210296, -0.035289247, 0.007338374, -0.007616189, -0.009344061, -0.0006085667, 0.007561981, -0.036536023, 0.0011281988, 0.019894244, 0.027713712, -0.003472684, 0.019460581, -0.021384956, 0.046347626, -0.015191722, -0.039409034, 0.03797253, 0.00212596, 0.030790001, -0.06282678, 0.018525498, -0.012576198, 0.020666704, -0.018444186, -0.022211626, 0.020653153, -0.036400504, -0.0013950026, -0.004350172, 0.027727263, -0.020395666, -0.0013153849, -0.0086732395, 0.015801558, 0.0029932843, -0.0074806693, 0.009140782, -0.04810938, -0.010584063, 0.013247019, 0.011986689, 0.029787159, -0.052202065, -0.014121119, -0.0042112647, 0.01042144, 0.013545161, 0.011769857, -0.049491674, -0.03119656, 0.038650125, 0.027645953, -0.010380784, 0.01637074, 0.025992615, 0.006281323, -0.012128984, -0.008408977, 0.021777963, -0.033283558, 0.024705183, -0.03474717, -0.030518962, 0.0030119182, 0.012108656, -0.017658174, -0.01290822, -0.047458883, 0.00043959098, 0.018430635, 0.03791
|
|||
|
"Technical patterns
|
|||
|
Input processing
|
|||
|
Process input according to task
|
|||
|
Q&A
|
|||
|
HyDE: Ask LLM to hypothetically answer thequestion & use the answer to search the KB
|
|||
|
embeddings
|
|||
|
.983, 0.123, 0.289…
|
|||
|
.876, 0.145, 0.179…
|
|||
|
Content search
|
|||
|
Prompt LLM to rephrase input & optionally addmore context
|
|||
|
query
|
|||
|
SELECT * from items…
|
|||
|
DB search
|
|||
|
NER: Find relevant entities to be used for akeyword search or to construct a search query
|
|||
|
keywords
|
|||
|
red
|
|||
|
summer
|
|||
|
BEST PRACTICES
|
|||
|
Consider how to transform theinput to match content in thedatabase
|
|||
|
Consider using metadata toaugment the user input
|
|||
|
COMMON PITFALLS
|
|||
|
➔ Comparing directly the inputto the database withoutconsidering the taskspecificities
|
|||
|
","[-0.015815059, 0.031102022, 0.057312217, 0.030851873, 0.056867506, -0.02355582, 0.016370948, 0.061147854, -0.0052878996, 0.054810714, 0.031379968, -0.006034876, -0.012479722, -0.008532905, -0.01268818, -0.004864034, -0.003229371, 0.032047037, -0.0067227897, 0.017871851, 0.07304389, -0.031880267, -0.015231375, 0.038884476, 0.01953952, 0.014731075, -0.00205158, 0.050474774, 0.020720785, -0.00946402, 0.027933452, -0.01650992, -0.0009554352, -0.005346963, 0.04255335, 0.026001737, -0.0015573595, 0.042053048, 0.005819469, 0.010957974, -0.008901183, -0.013584552, -0.014897841, 0.010082448, -0.022763679, -0.005437295, -0.0059827617, 0.009102692, -0.0068165963, 0.045999862, 0.012729872, 0.0104159815, -0.0015903654, 0.02915641, 0.011604195, -0.013584552, -0.067485, -0.018691787, 0.006827019, 0.0079909125, -0.014870047, -0.029211998, 0.023597514, 0.030990845, -0.069319434, -0.036244, -0.042497758, -0.0012750718, -0.019803567, 0.043025855, 0.040969063, 0.025695996, 0.023861561, -0.022652501, 0.01923378, -0.016885146, 0.027933452, -0.010888487, -0.009547404, -0.01978967, -0.001003207, -0.018566713, -0.024792677, -0.05211465, -0.025848866, -0.010207523, -0.04641678, -0.014856149, -0.039106835, -0.08488434, -0.09400093, 0.010964923, -0.010026858, -0.0071362327, 0.049362995, 0.018066412, 0.0011769225, 0.027989041, -0.03852315, 0.07315507, 0.035354577, -0.03232498, -0.02602953, -0.03518781, 0.05720104, -0.0241673, -0.037327986, 0.023805972, -0.014925635, -0.01284105, -0.112400874, -0.056561768, -0.06843001, 0.008421727, 0.07321066, -0.032797486, -0.031741295, -0.018705685, -0.0058993786, 0.010110242, -0.059091065, 0.01687125, -0.010103294, -0.032352775, -0.020831963, -0.032158215, 0.021415647, -0.0032015766, -0.00951961, -0.015092403, 0.042358786, -0.0005954099, 0.051169638, -0.013876394, -0.025793277, 0.0035542191, -0.017482728, 0.014981224, 0.011889089, -0.0076712766, 0.033964854, -0.013584552, 0.011854346, 0.0528651, -0.03649415, -0.012173982, -0.019622903, 0.031352174, 0.0012568317, 0.016231976, -0.009901783, -0.040413175, -0.08382815, -0.002230507, 0.011923832, -0.026905056, 0.011520812, -0.0038495355, -0.016801763, -0.026752187, 0.021888154, -0.03755034, 0.039301395, 0.0086788265, -0.02693285, -0.010527159, -0.04102465, 0.030601723, -0.06187051, -0.0018344356, -0.049112845, -0.058979888, -0.0019664594, 0.01318848, -0.025112312, -0.024987238, 0.0023642678, -0.02084586, -0.017899645, -0.006000133, -0.048306804, 0.018497227, -0.005499833, -9.87464e-05, -0.021234982, -0.047222823, -0.052698333, 0.0034517269, -0.04491588, -0.012715975, -0.0043776305, 0.022124406, 0.05478292, -0.022041023, 0.00093458936, -0.034103826, 0.03807844, -0.005826418, -0.0014592102, -0.016370948, 0.05130861, 0.008727467, 0.03243616, 0.021790871, -0.01223652, 0.007712968, 0.0052288366, 0.02487606, -0.044943675, -0.04174731, 0.014084852, -0.039801694, 0.059924897, 0.05100287, -0.02240235, 0.029295381, -0.036577534, 0.01027006, -0.058590762, -0.0073168967, -0.04536059, -0.0013106834, 0.05347658, 0.007070221, -0.032047037, 0.04224761, 0.03866212, -0.044276606, 0.0034239325, -0.072376825, 0.042414375, -0.009491815, 0.0014340214, 0.002822877, -0.011868243, 0.004759805, 0.002287833, -0.031213202, -0.031546734, -0.0018292242, 0.002557092, -0.0015434622, -0.03329779, 0.003745306, -0.04511044, 0.02825309, -0.01238939, -0.016176388, 0.06603968, -0.01595403, -0.014008418, -0.04405425, -0.0003758769, -0.0056665996, 0.03165791, -0.03807844, -0.04174731, 0.04255335, 0.0066602523, -0.026877262, -0.016662791, 0.032658514, 0.013195429, 0.03418721, -0.056978684, -0.011423531, 0.009943475, -0.010652235, -0.04435999, -0.027599918, -0.014112647, 0.018441638, 0.029434355, 0.003745306, -0.048417985, -0.05242039, -0.011083049, 0.005221888, -0.006705418, -0.010819001, -0.035882674, -0.020276073, 0.03996846, 0.004989109, 0.004672947, 0.051781114, -0.017260373, 0.007844992, 0.022485735, -0.006938197, 0.008241063, -0.031435557, 0.059091065, -0.040357586, -0.005670074, 0.010895436, 0.0032450056, 0.0022374557, 0.022930445, -0.03418721, 0.04244217, 0.02637696, 0.013348299, 0.010951025, -0.
|
|||
|
"Technical patterns
|
|||
|
Input processing: input augmentation
|
|||
|
What is input augmentation?
|
|||
|
Example approaches
|
|||
|
Augmenting the input means turningit into something different, eitherrephrasing it, splitting it in severalinputs or expanding it.
|
|||
|
This helps boost performance asthe LLM might understand betterthe user intent.
|
|||
|
Queryexpansion*
|
|||
|
Rephrase thequery to bemoredescriptive
|
|||
|
HyDE*
|
|||
|
Hypotheticallyanswer thequestion & usethe answer tosearch the KB
|
|||
|
Splitting a query in N*
|
|||
|
When there is more than 1 question orintent in a user query, considersplitting it in several queries
|
|||
|
Fallback
|
|||
|
Considerimplementing aflow where the LLMcan ask forclarification whenthere is not enoughinformation in theoriginal user queryto get a result
|
|||
|
(Especially relevantwith tool usage)
|
|||
|
* GPT-4 can do this for you with the right prompt
|
|||
|
","[-0.013776567, 0.0351512, 0.048157144, 0.032690614, 0.027472015, -0.0026211303, -0.011167266, 0.03912599, -0.009936974, 0.05835099, 0.017818954, -0.006117661, -0.022550847, -0.0071721966, -0.034177784, -0.008078016, 0.0024707238, 0.016561624, -0.034204822, 0.04169473, 0.0061818794, -0.03339364, 0.026741952, 0.0069220825, 0.02418673, -0.014384952, -0.024403045, 0.045885835, 0.010504801, -0.0030689703, 0.055971526, -0.026660834, -0.01979283, 0.0013578841, 0.044750184, 0.032393184, 0.007151917, 0.04921168, 0.0052490206, 0.026147084, 0.003596238, -0.026741952, -0.009578702, 0.073060416, -0.016169552, 0.014831102, 6.205328e-07, -0.007516949, -0.05894586, 0.04886017, -0.0040660477, -0.007266835, 0.0018268485, 0.014668866, 9.3079916e-07, 0.002722528, -0.064461894, -0.031365685, 0.03774698, -0.008706682, -0.025714455, -0.03566495, 0.047751553, 0.011370061, -0.058242835, 0.0058303676, -0.040586118, 0.008098296, -0.0050867843, 0.06667912, 0.01102531, -0.00834841, -0.011282183, -0.018778853, 0.03877448, 0.025795573, -0.008402489, 0.011532297, 0.015696364, -0.023186272, 0.036178697, -0.012086605, -0.0089432765, -0.058296915, 0.011687774, 0.02284828, -0.050347336, 0.0033782332, -0.050320294, -0.07684593, -0.03685468, -0.001977255, -0.024254328, 0.008476847, 0.020036183, 0.044560906, 0.022253415, 0.018535499, -0.014398472, 0.069328986, 0.02195598, -0.025673896, -0.023537785, -0.034934886, 0.07392568, -0.04004533, -0.02901326, 0.009822057, 0.0045764158, -0.035502713, -0.067544386, -0.05142891, -0.02987852, -0.026701393, 0.05835099, -0.046859253, -0.026214683, 0.02675547, -0.01711593, 0.00093370373, -0.04088355, -0.013269578, 0.024795117, -0.04134322, -0.002240889, -0.046859253, -0.015615244, -0.013019464, -0.0015158955, 0.0015429349, 0.019698191, 0.032447264, 0.049509116, -0.0034880806, -0.01097799, -0.03698988, -0.011336262, 0.023483707, -0.0012226872, -0.017616158, 0.046399586, -0.010937431, 0.010051891, 0.048833128, -0.03482673, 0.01627771, -0.014601268, 0.04445275, -0.022604926, 0.01453367, -0.043857884, -0.018170467, -0.046345506, -0.0032278267, 0.0047859713, -0.021266475, 0.004738652, 0.029797401, 0.008530926, -0.048103064, -0.0120054865, -0.017305207, 0.0035016004, 0.0021310416, -0.03255542, 0.0048907488, -0.02630932, 0.015507087, -0.055268504, -0.033988506, -0.04088355, -0.074953176, -0.019914508, 0.016183073, -0.007564268, -0.024686959, -0.050644767, -0.028688787, -0.027796488, -0.02987852, -0.036340933, 0.057431653, -0.02333499, 0.014871662, -0.018684216, -0.051753383, -0.0326095, 0.022996997, -0.030446347, -0.0019468357, -0.013702208, 0.014303834, 0.079874344, -0.006110901, 0.006063582, -0.059054017, 0.06451597, -0.030067796, 0.03079786, -0.03290693, 0.05667455, 0.027674811, 0.043181896, 0.018265104, 0.014682386, 0.012647673, -0.024294887, 0.0031517784, -0.02287532, -0.015709883, -0.0023896056, -0.01934668, 0.03698988, 0.03744955, -0.043208938, 0.024051532, -0.049941745, -0.023808178, -0.041559536, -0.014844622, -0.035232317, -0.0032244467, 0.04383084, 0.028039843, -0.0035353997, 0.030743781, 0.035070084, -0.030716741, 0.017480962, -0.04704853, 0.019211482, -0.017940631, -0.01275583, -0.014263275, -0.0077603036, -0.019170923, 0.027039384, -0.008517406, -0.0421544, -0.044479787, 0.021415193, -0.0032345864, -0.0062055388, 0.02060401, -0.030933056, 0.03831481, -0.006773366, -0.025119588, 0.069220826, -0.0065671904, -0.021009602, -0.05010398, -0.00035848308, -0.009700379, 0.010450723, -0.018183986, -0.007773823, 0.040640194, -0.035070084, -0.026174124, 0.012850468, 0.007111358, -0.00440066, 0.044155315, -0.018143427, 0.01142414, 0.01581804, 0.0048941285, -0.02244269, -0.021847824, 0.0049887667, 0.03828777, 0.012870748, 0.006742947, -0.037936255, -0.040234603, 0.024105612, -0.004424319, -0.039369345, 0.028959181, -0.036746524, -0.038044415, 0.06705768, 0.011883809, 0.016859056, 0.019860428, 0.015142055, -0.033691075, -0.016886096, -0.026512116, 0.024565281, -0.004880609, 0.04264111, -0.044642024, -0.0052524004, 0.021861343, -0.014614788, 0.014222716, 0.025173668, -0.041126903, 0.021672066, 0.0122894, 0.025876692, 0.002592401,
|
|||
|
"Technical patterns
|
|||
|
Input processing: NER
|
|||
|
Why use NER?
|
|||
|
Using NER (Named EntityRecognition) allows to extractrelevant entities from the input, thatcan then be used for moredeterministic search queries.This can be useful when the scopeis very constrained.
|
|||
|
Example
|
|||
|
Searching for movies
|
|||
|
If you have a structured database containingmetadata on movies, you can extract genre,actors or directors names, etc. from the userquery and use this to search the database
|
|||
|
Note: You can use exact values or embeddings afterhaving extracted the relevant entities
|
|||
|
","[-0.021743642, 0.03672044, 0.010429188, -0.0009951688, 0.035992824, -0.004405119, 0.0012847, 0.070287876, -0.017632604, 0.04654328, 0.013169881, -0.003713882, -0.023453545, -0.0180813, 0.0026270032, 0.023198878, 0.00022453828, 0.043560047, -0.022289356, 0.023247387, 0.09434777, 0.009883475, -0.0100229345, -0.012745437, 0.04152272, 0.023417164, 0.015170829, 0.11195611, 0.039461136, -0.020057995, -0.023975004, -0.00409285, 0.009816776, -0.00037650426, 0.04164399, -0.03262153, -0.022325737, 0.017329428, -0.0050751334, 0.018711902, 0.015789304, -0.012169407, -0.027552458, 0.067668445, -0.036308125, -0.014479592, -0.029225979, -0.020094376, -0.012539279, 0.028086044, -0.012563533, -0.021852786, -0.009204364, -0.015449749, -0.021404088, -0.026339762, -0.06228408, -0.012927341, 0.023659702, 0.009974427, -0.0062211314, -0.016177367, 0.046397757, -0.00778551, -0.035071176, -0.0029529154, -0.070239365, -0.01477064, -0.005693609, 0.04494252, 0.060828842, -0.007894652, -0.022641039, -0.010223029, 0.019960979, 0.0073913834, -0.011393281, -0.005020562, -0.017232412, -0.019682059, 0.016541176, -0.014164291, 0.001017149, -0.03967942, -0.014867656, -0.023756718, -0.030244643, -0.015437623, -0.046300743, -0.04072234, -0.047610454, 0.016274383, -0.019475901, 0.012878833, 0.02251977, 0.041134655, -0.015740797, -0.019087838, 0.020288408, 0.07285879, -0.037860375, 0.024181163, -0.026121477, -0.039218597, 0.051127274, -0.021185802, -0.020215645, 0.0025163447, -0.01928187, -0.040504053, -0.07892227, -0.029832326, -0.03788463, 0.0213192, 0.06742591, -0.04579141, -0.022544023, 0.033470415, 0.0045991503, 0.056657165, -0.026655063, 0.012963722, -0.021986183, -0.012048136, -0.0139702605, -0.009343824, -0.014734259, 0.030753976, 0.026873348, -0.0058361003, 0.036089838, 0.017341556, 0.057724338, 0.0025678843, -0.06247811, -0.026218493, -0.03053569, -0.0120420735, 0.027576711, 0.017220287, 0.032233465, -0.032912575, 0.0041868337, 0.053310126, -0.029759565, 0.005924021, -0.05030264, 0.004565801, 0.022204468, 0.035071176, -0.018396601, -0.0411104, -0.065728135, -0.00090649043, 0.0049478007, -0.023053356, 0.008058366, -0.018299585, -0.009737951, -0.025563637, 0.0027149236, -0.024423702, 0.009628808, 0.030293152, -0.016395653, 0.011926867, -0.02287145, 0.021731516, -0.027382681, 0.037108503, -0.032548767, -0.046130963, -0.022277229, 0.013618578, -0.04152272, -0.027964775, 0.013315405, -0.009404459, -0.016832223, -0.033712953, -0.04450595, 0.015376988, -0.030390168, 0.0071791615, -0.012096644, 0.0059846556, -0.034634605, 0.02119793, -0.045524616, 0.017305175, 0.010526204, 0.04814404, 0.059470624, 0.0069123683, -0.015837813, -0.026727824, 0.008276652, -0.009986553, 0.02954128, -0.024617733, 0.035701778, -0.0015166282, -0.0007806732, 0.054231774, -0.028158806, -0.016613938, -0.022495514, -0.027819252, -0.030171882, -0.030559944, 0.016662447, -0.035434984, 0.025854683, 0.021282818, -0.049041435, 0.012818199, -0.0166867, 0.011945058, -0.052436985, -0.035556253, -0.0145281, -0.00752478, 0.034198035, 0.009968363, -0.015061687, -0.02104028, 0.017863015, -0.061798997, 0.021379834, -0.043608557, 0.01879679, 0.024617733, 0.02961404, 0.007985605, 0.0017205128, 0.019742694, -0.018372348, 0.00092468085, -0.042104814, 0.0051933713, -0.023683958, -0.024472209, -0.0091073485, 0.038927548, -0.0685901, 0.043026462, -0.020470312, -0.0038715326, 0.04525782, 0.008773857, 0.02546662, -0.021501103, -0.0031863593, -0.012539279, 0.02750395, -0.035095427, -0.023768846, 0.04814404, 0.0063424013, 0.016771588, 0.031481594, 0.014067276, -0.0060089095, 0.02287145, -0.05229146, -0.037739106, -0.013824737, 0.0048053088, 0.0006684988, -0.003935199, -0.014212799, -0.0025678843, -0.0034470889, -0.018032793, -0.09439627, 0.010150267, -0.027819252, 0.022447007, -0.014564482, 0.0025966857, -0.0411104, -0.022010436, 0.04581566, -0.008779921, 0.0040716277, 0.019888218, 0.0005419236, -0.031190546, -0.007791573, -0.03492565, 0.03613835, -0.013630705, 0.020858375, -0.04690709, 0.001822076, -0.0100229345, 0.04130443, -0.01648054, 0.02527259, -0.040188752, 0.020894757, -0.022895705, 0.034319304, 0.
|
|||
|
"Technical patterns
|
|||
|
Retrieval
|
|||
|
re-ranking
|
|||
|
INPUT
|
|||
|
embeddings
|
|||
|
.983, 0.123, 0.289…
|
|||
|
.876, 0.145, 0.179…
|
|||
|
query
|
|||
|
SELECT * from items…
|
|||
|
keywords
|
|||
|
red
|
|||
|
summer
|
|||
|
Semanticsearch
|
|||
|
RESULTS
|
|||
|
RESULTS
|
|||
|
vector DB
|
|||
|
relational /nosql db
|
|||
|
FINAL RESULT
|
|||
|
Used togenerate output
|
|||
|
BEST PRACTICES
|
|||
|
Use a combination of semanticsearch and deterministic querieswhere possible
|
|||
|
+ Cache output where possible
|
|||
|
COMMON PITFALLS
|
|||
|
➔ The wrong elements could becompared when looking attext similarity, that is whyre-ranking is important
|
|||
|
","[0.0054991697, 0.038819227, 0.05731342, -0.0016716415, 0.022912102, 0.0010638472, 0.008026532, 0.030169148, -0.017233828, 0.022805965, 0.024782747, -0.016039798, -0.0065472624, -0.02649419, 0.008822552, 0.0076683233, 0.011237145, 0.0013888886, -0.029665003, 0.031601984, 0.037386395, -0.05317412, 0.0070116073, 0.013194027, 0.03375124, 0.017711438, 0.022514092, 0.07445438, 0.05298838, -0.026242116, -0.0104344925, -0.033618566, -0.0010870645, -0.011243779, 0.013432833, 0.009883911, -0.00898839, 0.0055157533, -0.0031276941, 0.013492535, 0.015336647, 0.023999995, -0.00790713, 0.013386399, 0.012862353, -0.00484577, 0.0031691536, -0.06336317, 0.0026185731, 0.056145925, -0.018839134, 0.008172469, -0.0064378097, 0.034892198, 0.02971807, 0.0016152568, -0.03669651, 0.005860695, 0.032424536, 0.0035058036, 0.014155884, -0.007674957, 0.042374782, 0.008676616, -0.06548589, -0.009074625, -0.0376252, -0.0008582088, -0.009366499, 0.013213928, 0.043436144, 0.0049452726, 0.04608954, -0.027834157, 0.015495851, -0.004961856, 0.035104472, 0.00181592, -0.0072835805, -0.02300497, -0.011276946, -0.006991707, 0.024517408, -0.041844103, -0.021558868, -0.043197338, -0.03494527, -0.03465339, 0.010905471, -0.04526699, -0.080451064, 0.0072570466, -0.0006475952, 0.018786065, 0.023257043, 0.016769482, -0.008796018, 0.035820886, -0.05497843, 0.08862353, 0.01712769, -0.024398005, -0.005615256, -0.024305135, 0.016344938, -0.027223876, -0.036537305, -0.010633497, -0.021479266, -0.023363179, -0.08623547, -0.03457379, -0.06378771, 0.036669977, 0.0537048, -0.021691538, -0.07625869, 0.022660028, -0.008338307, 0.051210605, -0.017207293, 0.011197344, -0.048238795, -0.007774459, -0.022752898, -0.017101157, 0.009280263, -0.017034823, 0.019462682, -0.021598669, 0.059595343, 0.0019303479, 0.0362985, -0.011999997, -0.0633101, -0.013744608, -0.03797014, 0.0147927, -0.0080796005, 0.03276948, 0.0103946915, -0.029558865, -0.037121054, 0.032716412, -0.0309121, -0.024344936, -0.020616911, 0.0030812598, 0.021744605, 0.0077611925, 0.0004875621, -0.054208945, -0.0576849, 0.031601984, -0.017194027, -0.019608619, 0.01251741, -0.038713094, -0.025233826, -0.027131006, -0.012019898, -0.013678272, 0.00020740046, -0.0035655051, -0.028364837, -0.004660032, -0.06675952, 0.014965171, -0.060072955, -0.035077937, -0.0048656706, -0.07997345, 0.013492535, -0.009373132, -0.028868983, -0.014354889, -0.016079599, -0.0010124376, -0.009651739, 0.008696516, -0.047814254, 0.011728024, -0.0050514084, 0.02924046, 0.015694857, -0.037731335, -0.053545594, 0.013466001, -0.042533986, 0.016132666, 0.001687396, 0.02759535, 0.0484776, 0.018626861, -0.011582087, -0.016318405, 0.012072966, 0.02230182, -0.034308452, -0.0002848258, 0.026772797, 0.016543943, 0.004308457, 0.030434487, -0.038102813, -0.011873961, -0.0054461015, 6.395106e-05, -0.04879601, -0.030965168, 0.0078009935, -0.0071708113, 0.03077943, 0.022726363, -0.0255257, 0.005296848, -0.032689877, 0.017260361, -0.01837479, -0.00048424533, -0.02490215, -0.0010646764, 0.013943613, -0.008769484, 0.0032006628, 0.074135974, 0.06893531, -0.04486898, 0.0045373123, -0.06628191, 0.048689872, 0.013492535, 0.02609618, -0.0009129351, -0.020232169, 0.0066268644, 0.01911774, 0.0016368156, -0.032398004, -0.011714757, -0.023787724, -0.015150909, -0.0016036481, 0.026480922, -0.020855717, 0.023960194, -0.010082916, 0.002444444, 0.039270308, -0.0060696504, -0.0017744607, -0.021465998, 0.0016907128, -0.018560527, 0.053041447, -0.04269319, -0.050016575, 0.031097837, 0.019966828, -0.013094525, -0.05200662, 0.036112763, 0.02243449, 0.021784406, -0.06920065, 0.0036616907, -0.00078689866, -0.017724706, -0.0031791038, -0.058003306, -0.009777776, 0.01792371, 0.028152565, 0.013001655, -0.0376252, -0.012291871, -0.019303478, 0.012835818, -0.0121194, 0.00036069643, -0.033406295, -0.013731341, 0.02702487, 0.00050663337, 0.01929021, 0.007635156, -0.0019734656, -0.005363183, 0.015548918, -0.00046434483, 0.01718076, -0.06537975, 0.038315084, -0.043781087, -0.015761191, 0.008676616, 0.01687562, -0.019462682, -0.008271972, -0.031230507, 0.04579767, -0.017432833, 0.032530673, 0.023111
|
|||
|
"Technical patterns
|
|||
|
Retrieval: search
|
|||
|
How to search?
|
|||
|
Semantic search
|
|||
|
Keyword search
|
|||
|
Search query
|
|||
|
There are many differentapproaches to search depending onthe use case and the existingsystem.
|
|||
|
Using embeddings, youcan perform semanticsearches. You cancompare embeddingswith what is in yourdatabase and find themost similar.
|
|||
|
If you have extractedspecific entities orkeywords to search for,you can search for thesein your database.
|
|||
|
Based on the extractedentities you have or theuser input as is, you canconstruct search queries(SQL, cypher…) and usethese queries to searchyour database.
|
|||
|
You can use a hybrid approach and combine several of these.
|
|||
|
You can perform multiple searches in parallel or in sequence, orsearch for keywords with their embeddings for example.
|
|||
|
","[-0.026202023, 0.040806785, 0.046951603, 0.015253861, 0.020544032, 0.009931237, 0.007161742, 0.06209728, -0.011965086, 0.01689825, 0.019364832, -0.056991022, 0.009828463, -0.025141826, -0.010656066, 0.0007356472, -0.001441544, 0.02628857, 0.0107155675, 0.0051684626, 0.05850559, 0.001972995, -0.020706305, 0.044398475, 0.01147826, 0.0009188829, 0.02230742, 0.06949703, 0.0072374707, -0.021485226, 0.010748022, -0.011229439, -0.00071130594, -0.0034429373, 0.0363929, 0.02851715, -0.036695816, 0.033450313, -0.0067290086, 0.007924436, 0.022999795, 0.015924599, -0.014950948, -0.0041055605, -0.021820595, -0.025401466, -0.04201844, -0.028170962, -0.010320698, 0.047990162, -0.003334754, -0.025726017, -0.010520837, 0.0012312625, 0.026440026, -0.011402532, -0.06387149, -0.03464033, 0.032390114, 0.042883907, -0.008221939, 0.013620292, 0.02942589, -0.013230831, -0.046562143, 0.0016741384, -0.039833132, 0.04011441, -0.058289226, 0.04894218, 0.05452444, 0.041607343, 0.035051428, 0.010839978, 0.0026207434, 0.010867024, 0.03370995, 0.02276179, -0.031200098, -0.019408105, 0.017244436, -0.034423962, 0.0004790497, -0.009049543, -0.023129614, -0.0043354505, -0.052230954, -0.015307954, 0.0022015325, -0.06603516, -0.04117461, 0.035181247, 0.00037221858, -0.009812236, 0.06936721, 0.038643118, -0.007086014, -0.0016538539, -0.009390321, 0.08633037, -0.005928451, -0.0077837966, -0.01246273, -0.010066467, 0.031135187, -0.02936098, -0.031135187, -0.0011988075, -0.013522927, -0.030680817, -0.07888734, -0.040763512, -0.0022921362, 0.011121255, 0.051754948, -0.013447199, -0.0363929, -0.0020068025, -0.005657993, 0.037929107, -0.052360773, -0.00071401056, -0.02047912, -0.0044003604, -0.012051633, -0.025012005, -0.032541573, -0.021355405, -0.02047912, 0.012040814, 0.037604555, -0.0032184566, 0.03132992, 0.004389542, -0.009054952, -0.02159341, -0.05629865, 0.0357438, -0.005728312, 0.00072280044, 0.036868908, -0.056082282, -0.00776216, 0.03072409, -0.03667418, -0.001732287, -0.01749326, 0.020901036, 0.020825308, -0.00028888352, -0.0027438018, -0.077848785, -0.050370198, 0.023843626, 0.010704749, 0.0008390976, -0.008303077, -0.0160436, -0.021701593, -0.00029446173, -0.019786747, 0.005987952, 0.021333769, 0.011099619, -0.04833635, -0.015059131, -0.061015446, 0.0039378763, -0.03821038, -0.008557308, -0.016011145, -0.06573224, -0.0030345449, 0.0121814525, -0.005100848, -0.029966807, -0.0073943366, -0.009125271, -0.019754292, -0.0008411261, -0.020922672, -0.002504446, -0.03007499, 0.011878539, 0.050067283, -0.01415039, -0.030550996, 0.023410892, -0.048855633, 0.03853493, -0.0022853746, 0.05270696, 0.063525304, -0.00926591, 0.01585969, 0.0036944638, 0.007221243, 0.019224193, 0.00573913, -0.031178461, 0.03712855, -0.02132295, 0.006085317, 0.02269688, -0.03150301, -0.007848707, 0.020890217, 0.014702126, -0.05413498, -0.0053767157, -0.0017985493, -0.004814162, 0.0314381, 0.023713805, -0.06456386, 0.03178429, -0.026050566, 0.012635823, -0.03464033, -0.04448502, -0.019537926, -0.012170634, 0.033688314, 0.009368684, 0.008865631, 0.031654466, 0.014474941, -0.08555145, -0.0032914805, -0.044138834, 0.047730524, 0.023735441, 0.031524647, 0.001575421, -0.0072104246, -0.013382289, 0.006647871, 0.021690775, -0.038643118, -0.032325204, -0.03758292, -0.023410892, -0.0075836573, 0.018769823, -0.045869768, 0.043554645, -0.0019378355, -0.0033536858, 0.053702246, -0.005008892, -0.022523787, -0.0331474, -0.001215035, 0.021766502, 0.05551973, -0.040222593, -0.044917755, 0.027305495, 0.010921116, 0.012192271, -0.004424702, 0.036241446, 0.036089987, 0.015610867, -0.06568897, -0.038383476, -0.017255254, -0.035808712, -0.034121048, -0.05179822, -0.037669465, 0.009157727, 0.037929107, -0.038318567, -0.06205401, -0.032455023, -0.028387329, 0.011467442, 0.035181247, 0.003927058, -0.0190511, -0.0149834035, 0.032757938, 0.0060636806, 0.06326566, 0.038448386, -0.010293652, -0.026504938, -0.023648895, -0.0106236115, 0.018834732, -0.04461484, 0.00058452855, -0.04461484, -0.017882718, 0.02531492, 0.02041421, 0.003951399, 0.011543171, -0.016324878, 0.028884972, -0.025033642, 0.033212308, 0.011099
|
|||
|
"Technical patterns
|
|||
|
Retrieval: multi-step retrieval
|
|||
|
What is multi-step retrieval?
|
|||
|
In some cases, there might beseveral actions to be performed toget the required information togenerate an answer.
|
|||
|
Things to consider
|
|||
|
●
|
|||
|
Framework to be used:
|
|||
|
○ When there are multiple steps to perform,consider whether you want to handle thisyourself or use a framework to make it easier
|
|||
|
●
|
|||
|
Cost & Latency:
|
|||
|
○
|
|||
|
○
|
|||
|
Performing multiple steps at the retrievalstage can increase latency and costsignificantly
|
|||
|
Consider performing actions in parallel toreduce latency
|
|||
|
●
|
|||
|
Chain of Thought:
|
|||
|
○
|
|||
|
○
|
|||
|
Guide the assistant with the chain of thoughtapproach: break down instructions intoseveral steps, with clear guidelines onwhether to continue, stop or do somethingelse.This is more appropriate when tasks need tobe performed sequentially - for example: “ifthis didn’t work, then do this”
|
|||
|
","[-0.012983024, 0.0087274425, 0.04976932, 0.008695637, 0.013142052, 0.020978939, 0.01994844, 0.028294215, -0.028930325, 0.045494653, 0.05177943, -0.0466651, -0.0014097809, -0.054247543, -0.00607804, 0.0022725062, 0.0045450125, -0.022721883, -0.018701661, 0.0070544705, 0.042644877, -0.007665137, -0.023815993, 0.028981214, 0.002911798, -0.02499916, -0.008180386, 0.06442532, -0.00831397, 0.0061384705, 0.030864103, -0.01427433, -0.0501001, 0.014159829, 0.03892999, 0.045443766, -0.01685694, 0.01834544, 0.00026120307, 0.03340855, 0.041830655, 0.010031469, -0.026207771, 0.030049881, 0.027429104, -0.005944457, -0.026016938, -0.010171414, -0.003606749, 0.08203287, -0.016882384, 0.009885164, 0.0053974013, 0.014770496, -0.021411495, -0.0048694294, -0.043815322, -0.05887843, 0.01026683, 0.052720875, -0.009090025, -0.051652208, -0.0042046933, -0.011004719, -0.041525323, -0.002746409, 0.009070942, 0.03462988, -0.017353106, 0.040914655, -0.0013827462, 0.02385416, 0.035062436, -0.02689477, 0.027683549, 0.019630384, 0.010279553, 0.009751581, 0.040532988, -0.014643274, 0.028930325, -0.06768221, 0.0059826234, -0.040125877, 0.0012833538, 0.027861658, -0.044807654, -0.03399377, -0.034757104, -0.0910402, -0.048726097, 0.029668214, -0.029337436, 0.04890421, 0.026131438, 0.003485888, -0.011392747, 0.037657768, -0.013154774, 0.03806488, 0.01795105, -0.041016433, -0.035545878, 0.001129097, 0.021080717, -0.023001771, -0.028217882, 0.04999832, -0.05607954, -0.00017821045, -0.08213464, -0.027734438, -0.04198332, 0.005206568, 0.07002309, -0.028523214, -0.014732329, -0.0010209581, 0.004115638, 0.012162441, 0.0010193678, 0.031093104, -0.017556662, -0.01679333, -0.0025412631, -0.032594323, 0.003520874, 0.0072262203, 0.01909605, -0.010489469, 0.029846326, 0.0028434158, 0.042390432, -0.014808663, -0.0020276036, -0.041830655, -0.008129498, 0.025075493, -0.025927883, 0.013689107, 0.022620106, -0.04798821, -0.01714955, 0.056893762, -0.04038032, 0.047428433, -0.012652246, 0.021195216, -0.017709328, 0.035469547, -0.0478101, -0.029159326, -0.024172217, 0.0013628677, 0.03389199, 0.0017954231, -0.032238103, -0.008453915, -0.023777828, -0.020342829, -0.05045632, -0.03371388, -0.028599547, 0.011895275, -0.02969366, 0.016806051, -0.010794803, 0.016551606, -0.026792994, 0.0027305062, -0.004156985, -0.09460242, -0.018854327, 0.00997422, 0.038344767, -0.039515212, -0.03371388, 0.0004230138, -0.011723525, -0.0028704507, -0.03485888, 0.010934747, -0.026792994, 0.0011616977, 0.001381951, -0.03709799, -0.020902606, -0.004220596, -0.033917435, 0.017963773, 0.0047199433, 0.014655996, 0.03719977, -0.017124107, -0.0031233048, -0.0333831, 0.026284104, -0.026640326, -0.0014407913, -0.018574439, 0.02459205, -0.027072882, 0.02339616, -0.021017106, 0.010012386, -0.02413405, -0.022403827, 0.03719977, -0.012995747, -0.04419699, -0.0045100264, -0.056944653, 0.015241218, 0.050430875, -0.065493986, 0.019108772, -0.0059667206, -0.018739829, -0.035469547, 0.007836887, -0.032823324, -0.016615218, 0.02758177, 0.016360773, 0.020101106, 0.040125877, 0.021742271, -0.0636111, 0.022085773, -0.05842043, 0.016640663, 0.015495663, 0.030075325, -0.018269107, 0.009458969, 0.010521275, 0.015330274, 0.014236163, -0.036614545, -0.023955937, 0.0057059154, 0.010419497, 0.003120124, 0.012359636, -0.0482681, 0.02648766, 0.002018062, -0.026207771, 0.054552875, -0.011818942, 0.008053165, -0.06147376, 0.0031169436, -0.01060397, 0.027072882, -0.034884322, 0.016042719, 0.044120654, -0.009579831, -0.0021134787, 0.0054546515, 0.020304661, 0.029337436, 0.031830993, -0.03829388, 0.039184432, -0.004293749, 0.004484582, -0.041423544, -0.0400241, -0.01926144, 0.027072882, 0.044400543, 0.01903244, -0.054094873, -0.05205932, 0.02035555, -0.02298905, -0.013574608, 0.0391081, -0.06406909, -0.0021341522, 0.03646188, -0.017505772, 0.03669088, 0.005247915, 0.0018685759, -0.0075251926, -0.034782548, -0.009153636, 0.017136829, -0.03572399, -0.0029595061, -0.01186983, -0.009834276, -0.004551374, -0.024477549, -0.02179316, 0.02900666, 0.011208274, -0.0036162906, -5.6703328e-05, 0.030965881, 0.016373497, -0.007334359, -0.006322
|
|||
|
"Technical patterns
|
|||
|
Retrieval: re-ranking
|
|||
|
What is re-ranking?
|
|||
|
Example approaches
|
|||
|
Re-ranking means re-ordering theresults of the retrieval process tosurface more relevant results.
|
|||
|
This is particularly important whendoing semantic searches.
|
|||
|
Rule-based re-ranking
|
|||
|
You can use metadata to rank results by relevance. Forexample, you can look at the recency of the documents, attags, specific keywords in the title, etc.
|
|||
|
Re-ranking algorithms
|
|||
|
There are several existing algorithms/approaches you can usebased on your use case: BERT-based re-rankers,cross-encoder re-ranking, TF-IDF algorithms…
|
|||
|
","[-0.024321754, 0.031516537, 0.06409896, -0.013820279, 0.033018477, 0.019585794, -0.0059169205, 0.03263088, -0.032970026, 0.032873128, 0.003373311, -0.023582896, -0.01621854, 0.005075107, 0.039171588, -0.006516486, 0.0036155595, -0.0016715149, -0.044597957, 0.02834308, 0.025969043, -0.047286917, -0.0045330757, 0.039341163, 0.01572193, -0.0024194573, 0.030208394, 0.03539251, 0.0412307, 0.021899268, 0.006107691, -0.021632794, -0.021487447, -0.017974842, 0.022650238, -0.018374551, -0.034617316, 0.0012733189, 0.005099332, 0.0046118065, 0.011367513, 0.027640559, -0.04227237, 0.023328535, -0.016533462, 0.009835291, 0.012160877, -0.05460282, 0.006443811, 0.050145447, -0.0333334, -0.009163051, -0.027882807, -0.00019190626, 0.014765048, 0.014098865, -0.039462287, -0.0006866232, 0.038783994, 0.02125731, 0.0069404207, -0.01621854, 0.019755369, 0.005974455, -0.068410985, 0.00793364, -0.050581496, 0.01901651, 0.012057921, 0.015176871, 0.036773328, 0.021923494, 0.047529165, -0.014789274, 0.00815772, -0.003488379, 0.013905066, 0.033866346, 0.000127559, -0.03546519, -0.008224338, -0.036652204, 0.0139414035, -0.022371653, -0.02754366, 0.0008970766, -0.040503956, -0.039292715, -0.021584345, -0.016969511, -0.063566014, 0.0022105179, -0.020554788, 0.024927376, -0.0007456713, 0.015976291, -0.010574149, 0.047311142, -0.007648998, 0.06981603, -0.009962471, -0.03689445, -0.02311051, -0.023522334, 0.023473883, -0.040285934, -0.014801386, 0.028803352, -0.015455457, -0.036773328, -0.064195864, -0.053972974, -0.0673451, 0.01941622, 0.04302334, -0.040988453, -0.064535014, 0.043483615, -0.013614368, 0.04660862, -0.031080488, 0.00064498675, -0.028125055, -0.01407464, -0.028827576, -0.035126038, 0.010840623, -0.007412805, -0.0007827656, -0.031104714, 0.056056313, 0.028391529, 0.015939955, -0.037839223, -0.05353693, -0.055668715, -0.026041718, 0.009465862, -0.010107821, 0.0073461873, 0.018435115, -0.025024274, -0.04491288, 0.034714215, -0.0498063, -0.0152616585, -0.020942386, 0.0068192966, 0.0031976807, 0.022298979, -0.042926442, -0.046632845, -0.032970026, 0.047383815, -0.015467569, -0.015346445, 0.00487828, -0.018919611, 0.00035693808, -0.026792688, -0.020179303, 0.0110465335, -0.028318854, 0.014716599, -0.01621854, 0.0010076026, -0.01996128, -0.0006294677, -0.03628883, -0.025387647, 0.022311091, -0.07189937, 0.019694807, -0.012633261, 0.0146197, 0.017139085, -0.050726846, 0.019597907, 0.0072250627, 0.021451108, -0.013166209, 0.0062802937, -0.042732645, 0.010592317, 0.017417671, -0.028028157, -0.03972876, 0.0072735124, -0.046778195, 0.035707437, 0.008351519, 0.047892537, 0.046075672, 0.0073280185, -0.041303378, 0.0055323513, 0.024564002, 0.015164759, -0.013650705, -0.016376002, 0.0167636, 0.0061137476, 0.010537812, 0.04377431, -0.025024274, -0.02570257, -0.003988017, -0.009901909, -0.05188964, -0.03507759, 0.007636885, 0.0063650804, 0.02848843, 0.04539738, -0.077519536, -0.011173714, -0.048183236, 0.008036596, -0.026211292, -0.0032128212, 0.0055535478, -0.055959415, 0.00124758, 0.019428333, 0.015310108, 0.05983539, 0.03808147, -0.05460282, 0.0057443185, -0.052519485, 0.032097932, 0.0121124275, 0.018919611, -0.006807184, -0.005647419, 0.006201563, -0.01836244, 0.008351519, -0.019222422, -0.029505873, 0.016703038, 0.028536879, -0.006522542, 0.015758269, -0.033720996, 0.03498069, 0.00012434163, 0.002861561, 0.030595992, -0.030474868, 0.010313732, -0.02080915, 0.0116763795, -0.03958341, 0.035707437, -0.01996128, -0.023546558, 0.024769913, 0.013735493, -0.00823645, -0.02509695, 0.038662866, 0.02080915, 0.023062062, -0.038953565, -0.030499091, -0.0022756222, -0.036627978, -0.010325844, -0.056492362, -0.031080488, 0.026356641, 0.011985247, -0.0010931465, -0.025193848, -0.012899735, 0.01951312, -0.022383766, 0.012124539, -0.0066012726, -0.008636161, -0.02226264, 0.0414245, -0.010023033, 0.023316422, -0.0036700654, 0.022940937, -0.034496192, 0.0013104132, -0.019888606, 0.001700282, -0.058672596, -0.006443811, -0.09234515, -0.03817837, 0.012936072, 0.033624098, -0.038783994, -0.012730161, -0.010568093, 0.031468086, -0.02989347, 0.013590143, 0.029336298, -0.0
|
|||
|
"Technical patterns
|
|||
|
Answer Generation
|
|||
|
FINAL RESULT
|
|||
|
Piece of contentretrieved
|
|||
|
LLM
|
|||
|
Prompt includingthe content
|
|||
|
User sees thefinal result
|
|||
|
BEST PRACTICES
|
|||
|
Evaluate performance after eachexperimentation to assess if it’sworth exploring other paths
|
|||
|
+ Implement guardrails if applicable
|
|||
|
COMMON PITFALLS
|
|||
|
➔ Going for fine-tuning withouttrying other approaches
|
|||
|
➔ Not paying attention to theway the model is prompted
|
|||
|
","[0.03357087, 0.00030311814, 0.05451445, 0.0072308844, -0.0047810976, -0.01034949, 0.0026446998, 0.02390931, 0.013085914, 0.05913121, 0.062341537, -0.035252474, -0.029856062, -0.011939367, -0.0021402196, -0.022288857, 0.012978902, -0.023939883, -0.012504997, 0.013062983, 0.025759071, -0.0123674115, 0.018971518, 0.009462828, -0.00032031632, -0.004490639, 0.005381123, 0.03745384, 0.013147063, -0.00052406715, 0.036934074, -0.027364235, -0.025468612, -0.023557702, 0.032867655, 0.02829676, 0.03020767, 0.0314918, -0.006439768, -0.001299419, 0.0033937767, 0.0049454356, -0.0023504195, 0.044852886, 0.019781742, 0.024551375, 0.008713751, -0.031644672, 0.01555481, 0.0508455, -0.039563484, 0.018100142, 0.03531362, -0.004058773, -0.022533454, -0.02964204, -0.04005268, -0.02147863, 0.013445165, 0.0011140606, 0.0011494125, -0.03699522, 0.02869423, 0.017794397, 0.00085990963, 0.0022510523, -0.042682093, -0.012145746, 0.006263964, 0.035558216, 0.032347888, 0.0036058878, 0.011304945, 0.005958218, -0.022655752, 0.0064435895, 0.047054254, 0.04167313, 0.038951993, -0.046717934, 0.02294621, -0.016846584, 0.017977843, -0.06726404, -0.008614384, -0.0030593674, -0.06163832, -0.016540838, -0.05164044, -0.07166678, -0.052282505, -0.0035275402, -0.005388767, 0.04521978, 0.044975184, 0.01524142, -0.02216656, 0.032898232, 0.006921317, 0.05754133, 0.060843382, -0.033846043, -0.03662833, -0.008408005, 0.056379497, -0.02531574, -0.052068483, 0.013934358, -0.054147553, -0.012604364, -0.062922455, -0.0331734, -0.050570328, 0.012871891, 0.04720713, -0.03516075, -0.027486533, -0.0051135956, 0.034274086, 0.00032772112, -0.024780685, 0.034671556, -0.027700555, -0.055706855, 0.02092829, -0.0456784, 0.015898773, -0.01771796, 0.020148639, -0.014928031, 0.023725862, 0.023894021, 0.02874009, -0.017366352, -0.024704248, -0.0039708717, -0.013575107, 0.055523407, -0.053413764, 0.013139419, 0.018818645, -0.030834448, -0.04622874, 0.035558216, -0.023465978, -0.032256164, -0.01591406, 0.059559252, -0.031950418, 0.037606712, -0.035405345, -0.0071238736, -0.0663468, 0.02514758, -0.015417224, -0.01620452, -0.03143065, -0.0023905488, -0.046717934, -0.020102777, 0.012252756, -0.018084854, -0.016953595, 0.013131775, -0.024887696, -0.0101889735, -0.04259037, 0.010288341, -0.06610221, -0.010846327, -0.019751169, -0.037729014, -0.021998398, -0.014652859, -0.0067225825, -0.012015804, -0.0561349, -0.028877676, -0.018253015, -0.008759612, -0.010617018, 0.040083252, -0.044852886, 0.016449116, -0.015868198, -0.03583339, -0.010020813, -0.0074410844, -0.02216656, -0.034610406, -0.019827604, -0.007792692, 0.082673624, -0.0021039122, 0.009814435, -0.015180271, 0.057082713, -0.023328392, -0.01018133, 0.02953503, 0.008667889, 0.017366352, 0.044914033, -0.00038265978, 0.015080904, 0.036261432, -0.023588276, 0.017228767, -0.052496526, -0.059314653, 0.037423268, -0.016158657, 0.04011383, 0.002109645, -0.039777506, 0.023894021, -0.020393234, 0.01958301, -0.019537147, 0.043263007, -0.0070206844, -0.022411155, 0.03381547, 0.016235093, 0.035558216, 0.06689715, 0.050539754, -0.051273543, -0.016296243, -0.057266157, 0.036934074, 0.0067646224, -0.0133228665, -0.004074061, -0.016342105, -0.008415649, -0.0015745901, 0.009562195, -0.008820762, -0.021646792, 0.02447494, 0.026508147, -0.012520284, -0.012459135, -0.033601444, 0.031063758, -0.0062830728, -0.024872407, 0.01738164, 0.019261975, 0.041642558, -0.05488134, 0.01127437, -0.020851852, 0.039227165, -0.04430254, 0.00079063914, 0.021723228, -0.0008670755, -0.034182362, -0.008446223, 0.03739269, -0.019353699, 0.02699734, -0.05231308, 0.019353699, -0.006095804, 0.005855029, -0.0084997285, -0.07399044, -0.0033670238, -0.009485759, 0.016158657, 0.032256164, -0.04775747, -0.036567178, 0.010976269, 0.001032847, -0.02233472, -0.023068508, -0.054300427, -0.03369317, 0.032898232, 0.002533867, 0.021295184, -0.004517392, -0.011702415, 0.0013385926, 0.0038390188, 0.004307192, -0.009867941, -0.03610856, 0.025178153, -0.01889508, 0.008851336, -0.0035638476, -0.00090433826, -0.045250356, 0.021509206, -0.020897714, 0.027379522, 0.0018583603, 0.011182647, 0.001000
|
|||
|
"Technical patterns
|
|||
|
Answer Generation: context window
|
|||
|
How to manage context?
|
|||
|
Depending on your use case, there areseveral things to consider whenincluding retrieved content into thecontext window to generate an answer.
|
|||
|
Things to consider
|
|||
|
●
|
|||
|
Context window max size:
|
|||
|
○
|
|||
|
○
|
|||
|
There is a maximum size, so putting toomuch content is not ideal
|
|||
|
In conversation use cases, theconversation will be part of the contextas well and will add to that size
|
|||
|
●
|
|||
|
Cost & Latency vs Accuracy:
|
|||
|
○ More context results in increased
|
|||
|
latency and additional costs since therewill be more input tokens
|
|||
|
Less context might also result indecreased accuracy
|
|||
|
○
|
|||
|
●
|
|||
|
“Lost in the middle” problem:
|
|||
|
○ When there is too much context, LLMstend to forget the text “in the middle” ofthe content and might look over someimportant information.
|
|||
|
","[0.0022408804, 0.0009566139, 0.080032855, 0.03445786, 0.010241202, -0.021470303, 0.050580345, 0.022774326, -0.019823806, 0.072182365, 0.03635462, 0.0003325921, -0.013909594, 0.013527608, -0.0147526, -0.014344269, 0.0067242878, -0.0005202926, -0.034773987, 0.02172057, 0.017808495, -0.024578886, -0.027450373, 0.030743364, -0.0020383615, 0.0019000559, 0.012480436, 0.053609896, 0.030585302, -0.0021980715, -0.0016456723, -0.0060393456, -0.052608825, -0.018150967, 0.028267035, 0.015885388, 0.013672499, 0.03948955, 0.010379508, 0.0134485755, -0.016069796, 0.0034510547, -0.011380577, 0.019876495, 0.037935257, 0.022339651, -0.0029999148, 0.023972975, -0.017334305, 0.07750384, -0.015134587, 0.0025570076, -0.009365267, 0.012645086, 0.00011134426, -0.01421255, -0.04009546, -0.010221444, 0.016925974, 0.01360664, -0.020627296, -0.034273453, -0.009628706, 0.057903957, 0.0041656336, -0.0099382475, 0.0024713897, -0.01176915, -0.014265237, 0.07581783, 0.012598984, 0.00012605982, -0.010728565, -0.014357441, -0.00025191382, 0.07054904, 0.026844464, -0.0018457215, 0.0035136214, 0.00018193776, 0.047577135, -0.04396802, -0.004847283, -0.043704577, -0.020297997, 0.014252066, -0.016320065, 0.031085836, -0.0057396833, -0.061381355, -0.041676097, 0.010847113, -0.0008421825, -0.008858146, 0.028951978, -0.005624429, 0.00057298044, 0.009035967, 0.012322373, 0.028583163, 0.046444345, -0.04939487, -0.0068823514, -0.0034905705, 0.034905706, -0.0031052907, -0.06970604, 0.010959075, -0.06312005, -0.013632983, -0.085986584, -0.0410175, -0.06838884, 0.023946632, 0.040859435, -0.04963196, -0.04157072, -0.0054367282, 0.040200837, 0.029426169, -0.012177481, 0.045021776, 0.00029184134, -0.02721328, 0.01549023, -0.029794984, -0.015411198, -0.009569433, 0.009997521, -0.0064806063, 0.006042639, 0.027476719, 0.038593855, -0.015174103, -0.039278798, -0.020943424, 0.00019552135, 0.022352824, -0.044205114, -0.015411198, 0.016543988, -0.011821838, 0.018743705, 0.047840577, -0.05632332, 0.008877904, -0.00817979, 0.02662054, -0.03163906, 0.04681316, -0.0453379, -0.07023291, -0.07086517, 0.0076463255, 0.022076212, -0.013165378, -0.0064674346, -0.0017304668, -0.0063916957, -0.06148673, -0.034220763, -0.0037869397, -0.0072906823, -0.01830903, -0.03279819, 0.011314717, -0.0155165745, 0.013632983, -0.046022844, -0.02608049, -0.018822737, -0.052819576, -0.04752445, -0.00080390146, 0.019823806, -0.04807767, -0.068546906, -0.004010863, -0.0083576115, -0.0057001677, -0.03011111, 0.04465296, -0.019560367, -0.033483133, -0.006691358, -0.0663867, -0.0046727546, -0.017492369, -0.022484543, -0.047893263, 0.0064279186, -0.01635958, 0.08914786, 0.010142413, 0.022431856, -0.028003596, 0.047998637, 0.019995041, 0.009345509, -0.020087246, 0.044468552, 0.016860114, 0.03306163, 0.02025848, 0.0071721347, 0.003638755, -0.021206863, 0.032534752, -0.024460338, -0.035248175, 0.031270243, -0.045680374, 0.054795373, 0.023485612, -0.037987944, -0.0028649024, -0.01770312, 0.005624429, -0.02091708, -0.011308132, -0.04135997, 0.022036696, 0.04257179, 0.0295052, 0.0124738505, 0.0347213, 0.030822396, -0.028029941, 0.015068728, -0.036697093, 0.016175173, -0.0144628165, -0.042440068, -0.024592057, 0.01468674, -0.020153105, -0.01924424, 0.0019889667, -0.04030621, 0.016056625, 0.02265578, 0.017518712, -0.0030558957, 0.049184114, -0.018928112, 0.0030575423, -0.032086905, -0.056481384, 0.067018956, -0.016781082, 0.011676947, -0.06338349, 0.013204894, 0.011723048, 0.040069114, -0.025303343, -0.0050283973, 0.018256342, 0.009273063, -0.043151356, 0.01857247, 0.023380237, -0.012763633, 0.006592568, -0.018796394, 0.0057067536, 0.00094920467, -0.026027802, -0.021891804, -0.038066976, 0.0020778773, -0.0023627211, 0.0015295944, 0.015766842, -0.050079808, -0.03991105, -0.025158452, -0.015332167, -0.044310488, 0.0149896955, -0.061644793, -0.016069796, 0.028003596, 0.02876757, 0.020666812, -0.0084168855, 0.0040339143, 0.0035366723, 0.013514436, -0.030005734, 0.026067318, -0.03893633, 0.010142413, 0.01816414, 0.01183501, 0.004369799, -0.04257179, -0.011650602, 0.006177651, -0.016162, 0.025039904, 0.01817731, 0.0238017
|
|||
|
"Technical patterns
|
|||
|
Answer Generation: optimisation
|
|||
|
How to optimise?
|
|||
|
There are a few differentmethods to consider whenoptimising a RAG application.
|
|||
|
Try them from left to right, anditerate with several of theseapproaches if needed.
|
|||
|
Prompt Engineering
|
|||
|
Few-shot examples
|
|||
|
Fine-tuning
|
|||
|
At each point of theprocess, experiment withdifferent prompts to getthe expected input formator generate a relevantoutput.
|
|||
|
Try guiding the model ifthe process to get to thefinal outcome containsseveral steps.
|
|||
|
If the model doesn’tbehave as expected,provide examples of whatyou want e.g. provideexample user inputs andthe expected processingformat.
|
|||
|
If giving a few examplesisn’t enough, considerfine-tuning a model withmore examples for eachstep of the process: youcan fine-tune to get aspecific input processingor output format.
|
|||
|
","[-0.002689533, 0.025658078, 0.059388064, -0.0042708325, 0.006116785, -0.00713239, 0.01753324, 0.03003808, 0.010857376, 0.047584552, 0.03416666, -0.05600051, -0.052057184, -0.017877288, -0.015693905, -0.016898073, 0.017308285, 0.0009519226, -0.026901945, 0.033743218, 0.03983023, -0.02195294, 0.010182512, 0.004819987, 0.017890522, 0.01280919, 0.0059182956, 0.05062806, 0.019147621, -0.02908533, 0.017467078, -0.018208105, -0.01059934, -0.039909624, 0.025142005, 0.012657015, 0.033478566, 0.014794085, -0.010969854, 0.026690224, 0.0018724177, 0.0081116045, -0.0033296617, 0.050257545, 0.023024784, 0.032869864, 0.011380065, -0.048749026, -0.015191064, 0.024453908, -0.04279434, 0.039803766, 0.023739345, -0.021622125, -0.027497414, 0.019782789, -0.070080034, -0.023845207, 0.043111924, 0.009441485, 0.012888586, -0.030011615, 0.024506839, 0.047955066, -0.0315466, 0.0069140512, -0.050760385, 0.008237315, -0.035489924, 0.02998515, 0.029058864, -0.036680862, 0.035595786, -0.008700457, -0.010202361, -0.003715062, 0.04893428, 0.029244121, 0.042582616, -0.009428252, 0.028714817, -0.03652207, 0.009322391, -0.050945643, -0.022019103, -0.0031791404, -0.053221654, -0.017030401, -0.041524008, -0.05610637, -0.053327516, 0.01949167, 0.009461334, 0.054518454, 0.040121347, 0.028291373, -0.0003992534, 0.030964365, 0.024758259, 0.050469268, 0.03546346, -0.015085204, 0.007469822, 0.013642846, 0.05525948, -0.018155174, -0.044435184, 0.020537049, -0.040386, 0.007701393, -0.06224631, -0.037739474, -0.06732764, -0.012967981, 0.017374448, -0.033822615, -0.02847663, -0.007205169, 0.020510584, -0.012147558, -0.045467332, -0.002462924, -0.03064678, -0.041576937, -0.0039102435, -0.0372631, 0.0113999145, -0.033902008, 0.028264906, 0.0027490798, 0.033319775, 0.036442675, 0.025552217, -0.009415019, -0.03138781, -0.04911954, 0.0143574085, 0.021886777, -0.028661886, 0.035198808, 0.03339917, -0.010354537, -0.042212103, 0.061346494, -0.049304795, -0.032975726, -0.031176087, 0.03366382, -0.04279434, 0.026134454, -0.05531241, -0.008647527, -0.056688607, 0.008482119, 0.025247866, -0.02265427, -0.024017232, 0.018366896, -0.013431123, -0.0580648, -0.0026581055, -0.011088948, -0.026928412, 0.013735474, 0.0022859375, -0.024440676, -0.036204487, 0.016223209, -0.039697904, -0.0044263164, -0.006321891, -0.08024269, -0.019901883, -0.010625806, -0.0065865438, 0.0039102435, -0.041762196, -0.020470886, -0.048749026, 0.009335623, -0.0422915, 0.026107987, -0.03305512, 0.018062545, 0.015336623, -0.062405102, -0.038083524, -0.0246127, -0.032684606, -0.014807317, -0.004972162, -0.01994158, 0.04927833, 0.0051243375, 0.0044891713, -0.029058864, 0.051660206, -0.021489799, 0.004915924, 0.008422572, 0.02657113, -0.014648526, 0.045070354, -0.011075715, -0.008071907, 0.010063418, -0.044726305, 0.021489799, -0.027444484, -0.038612828, 0.0056172535, -0.004905999, 0.039512645, 0.055735856, -0.034669504, 0.0054617696, -0.016620189, 0.0030798956, -0.021185448, 0.007608765, -0.039777298, -0.03355796, 0.024149558, 0.017744962, 0.0073507284, 0.05510069, 0.03048799, -0.05525948, 0.02541989, -0.06579266, 0.009137134, -0.0105464095, -0.0022991702, -0.018155174, 0.008468886, 0.020616444, -0.007655079, 0.0056337942, -0.028185511, -0.020616444, 0.0016143814, 0.025261099, -0.02993222, -0.016143814, -0.043006063, 0.04329718, -0.03871869, -0.031625997, 0.041365214, -0.01753324, 0.027259227, -0.08426542, 0.026227081, -0.038956877, 0.01697747, -0.030514454, -0.008184385, 0.02276013, -0.019809254, -0.021873545, -0.019610764, 0.024400977, -0.0027275768, 0.044990957, -0.020007743, 0.00808514, 0.0010908653, -0.0061234017, -0.011915987, -0.031096691, -0.0032651525, -0.0023917987, -0.004274141, 0.034881223, -0.054624315, -0.017996382, 0.008224082, -0.003857313, -0.019769555, -0.019796021, -0.04742576, -0.03898334, 0.0712445, 0.019306414, 0.0035926602, 0.002797048, -0.000499532, 0.0039532497, 0.0037812253, -0.0069802147, 0.018896202, -0.03477536, -0.00750952, -0.022588108, 0.005815743, -0.015508647, -0.014238315, -0.022230826, 0.023090947, -0.056371022, 0.0015176177, -0.010103117, 0.01532339, -0.010050186, -0.0083
|
|||
|
"Technical patterns
|
|||
|
Answer Generation: safety checks
|
|||
|
Why include safety checks?
|
|||
|
Just because you provide the modelwith (supposedly) relevant contextdoesn’t mean the answer willsystematically be truthful or on-point.
|
|||
|
Depending on the use case, youmight want to double-check.
|
|||
|
Example evaluation framework: RAGAS
|
|||
|
","[-0.01279862, 0.037135735, 0.0381074, 0.033583093, -0.02348691, 0.01367919, -0.01756584, -0.008760147, 0.02968126, 0.0422066, 0.021801682, -0.05356291, -0.007188786, 0.025840156, -0.010779384, -0.016654907, 0.01191805, -0.0026549925, -0.030744016, 0.034979858, 0.012851758, 0.0012942851, -0.0040346775, -0.015607333, -0.025642786, -0.02335027, 0.024974769, 0.016715635, 0.0325507, -0.013117447, 0.027722752, -0.035921156, -0.048856415, -0.030121544, 0.0024215656, 0.016578995, 0.019235885, 0.019372525, -0.011804184, 0.014552168, 0.015341643, 0.0035640285, 0.0051961183, 0.05037464, 0.008342636, 0.018613415, 0.006782661, -0.051285572, -0.024185292, 0.0043686866, -0.031153936, -0.010544059, 0.026659995, -0.023669098, -0.010885659, -0.0083654085, -0.059666164, 0.00885124, 0.046821997, 0.016563812, -0.009921587, -0.04928152, -0.04867423, 0.015409963, -0.023365453, -0.024868492, -0.049524434, 0.0022260945, -0.013944878, 0.05331999, 0.03194341, 0.0033381928, 0.026158983, 0.0071773995, -0.02164986, 0.012001553, 0.06352245, 0.04077947, 0.016017253, 0.0103542805, 0.035647877, -0.0052872114, 0.00952685, -0.051224843, -0.012965624, -0.0023513478, -0.07348199, -0.007549364, -0.070141904, -0.06388682, -0.069473885, 0.02702437, 0.010293552, 0.027388742, 0.039109424, -0.032155965, -0.016624542, 0.009693854, 0.017778391, -0.0024633168, -0.0013739918, -0.041022386, 0.01667009, -0.005689541, 0.067955665, 0.008350226, -0.027798664, 0.02356282, -0.044332113, -0.012677162, -0.060334183, -0.05480785, -0.05957507, 0.035556782, 0.019645806, -0.01667009, -0.04940298, -0.010597196, 0.018324953, -0.0042586154, -0.003670304, -0.011842139, 0.02573388, -0.07384637, 0.01770248, -0.032307785, -0.014795084, -0.006441061, 0.0044445978, -0.0012791029, -0.01525055, 0.02143731, 0.044575028, -0.0011301272, -0.0108097475, -0.013929696, -0.032095235, -0.01334518, -0.047095276, 0.026629632, 0.009268751, 0.016184257, -0.018841147, 0.068441495, -0.029590167, -0.015394782, 0.014779901, 0.006133621, -0.00864628, 0.03750011, -0.03279362, -0.00030530515, -0.04855277, 0.028512228, -0.0026815613, -0.034645848, -0.018704507, 0.012107829, 0.01320854, -0.027054735, -0.008076946, 0.014385163, -0.026098253, 0.010703472, -0.03968635, 0.012927669, -0.030045634, -0.01627535, -0.027965669, 0.012684753, 0.010202459, -0.0034368774, -0.018491955, -0.0039208108, -0.014901359, -0.01443071, -0.04269243, -0.023243994, -0.027009187, -0.008904378, -0.04609325, 0.020480828, -0.04581997, -0.016897822, -6.422795e-05, -0.041113477, 0.008555187, -0.01034669, -0.030516282, -0.027783481, -0.034979858, 0.011189303, 0.050951563, 0.010149321, 0.011227259, -0.071052834, 0.018628595, 0.0018626698, 0.019068882, 0.0074506793, 0.013178175, -0.03737865, 0.03261143, -0.0034786284, -0.006414492, 0.028178219, -0.028724778, 0.01893224, -0.061943498, -0.08908933, 0.014134657, -0.030121544, 0.01443071, 0.077065, -0.015956523, 0.026432263, 0.016973734, 0.015326461, 0.00069695927, 0.022469701, -0.04922079, 0.017307742, 0.06412974, -0.0025202502, -0.0041333623, 0.05195359, 0.07372491, -0.00864628, 0.03655881, -0.040749107, 0.05650826, 0.0039929263, -0.015910977, -0.013147811, 0.014802675, 0.0023684278, 0.017489929, 0.008266725, -0.030485919, 0.008737373, 0.015364417, 0.03880578, -0.010832521, 0.038896874, -0.0083654085, 0.040840197, -0.008205995, -0.0072039682, 0.030379642, 0.020663016, 0.006460039, -0.05930179, 0.033643823, -0.04609325, -0.038168125, -0.019554712, 0.0021160233, -0.014612896, -0.017216649, -0.061791677, -0.016077982, 0.043573, -0.026204528, -0.012616433, -0.05262161, 0.015774338, 0.05650826, -0.005689541, -0.007970671, -0.05338072, 0.027373562, 0.037409015, 0.0021160233, -0.0025866725, -0.04888678, -0.024352297, 0.014278888, 0.042328056, -0.05250015, -0.00912452, -0.046002157, -0.025824973, 0.0747573, 0.041295666, 0.020055726, 0.011728273, -0.017262196, -0.015091137, -0.019235885, -0.01477231, 0.027343197, -0.032520335, 0.034068923, 0.0068320036, -0.001183265, -0.025991978, -0.005735087, -0.012624024, 0.008152857, -0.06412974, 0.03880578, 0.03370455, -0.0025847747, 0.0020382144, 0.0018949321, 0.0
|
|||
|
,"[0.015368387, -0.034810703, -0.009328825, 0.014480682, 0.0073433784, 0.014409349, -0.052247763, 0.049235906, -0.013592978, 0.015106832, 0.008250898, 0.03281337, -0.04172212, -0.015447646, 0.020306244, 0.06340747, -0.045526568, 0.027027437, -0.007763453, 0.01865765, 0.07437697, 0.014821498, -0.016676167, -0.030736774, 0.040105227, -0.014940387, 0.0031347072, -0.011730383, 0.027534697, -0.058905546, 0.044797383, -0.04248301, 0.003695467, -0.018150391, -0.01840402, 0.05646436, 0.024728917, 0.003093096, 0.025759287, 0.026868919, -0.0035904483, 0.028866254, -0.028454104, 0.03706167, 0.024237508, 0.02017943, -0.03197322, 0.023603434, 0.020797653, 0.05478406, -0.037442114, -0.031434257, -0.03230611, 0.07995683, -0.038012784, 0.0055045616, -0.023222988, 0.015201943, 0.003400226, -0.0066934517, -0.01643839, -0.02553736, 0.035349667, -0.005599673, -0.009994604, 0.020005058, 0.001957706, 0.037442114, 0.03842493, 0.015447646, -0.026187288, 0.04181723, -0.029516181, -0.0037331153, -0.029817365, 0.046192348, -0.03171959, 0.012348606, 0.00638434, 0.009519047, -0.02171706, 0.016834686, -0.010596975, -0.023952175, -0.021304913, -0.051169835, 0.006178266, -0.006951045, -0.005112228, -0.045780197, -0.0072601563, -0.0069470815, -0.016279869, -0.018847873, 0.065499924, 0.002686892, 0.010882308, 0.0012047421, -0.014227052, 0.032845072, 0.014385572, -0.04809457, -0.03962967, 0.012198013, 0.022969358, 0.07589875, 0.002785966, -0.010264086, -0.025299583, 0.04486079, -0.021162245, -0.050187018, 0.000848075, 0.019307576, -0.0047119684, 0.0070620077, 0.025584918, -0.10202263, 0.018102834, -0.029833218, -0.02493499, -0.009384306, 0.031656183, -0.028676031, -0.004597042, 0.02349247, -0.028057808, 0.010715864, -0.0034715594, -0.014195349, 0.023222988, -0.025473954, 0.028279735, -0.024364322, -0.041341674, 0.03468389, -0.02772492, -0.043656047, -0.010818901, 0.022271877, 0.03401811, -0.016034165, 0.031751294, -0.006752896, 0.0330987, 0.009170306, 0.002904855, -0.019529503, 0.004846709, -0.035000928, 0.030245366, 0.006087118, -0.017658982, 0.008025009, -0.006455674, -0.069558, 0.012372384, -0.005698747, -0.047872644, 0.0064715254, -0.017769946, 0.004616857, -0.028200475, -0.009653788, -0.046667904, 0.009844011, -0.061695475, 0.021669505, -0.09993018, 0.018134538, -0.023460766, 0.031656183, -0.061188214, 0.038900487, 0.02070254, -0.026932325, 0.007279971, -0.059793252, -0.064041555, 0.008813639, 0.014480682, 0.06213933, -0.046255756, -0.002498651, -0.027788326, 0.0116907535, -0.04061249, 0.03411322, 0.027106697, -0.039217524, -0.010890234, 0.02136832, 0.01251505, 0.02407899, 0.035476483, -0.051106427, -0.010739641, 0.005789895, -0.04876035, -0.0049933386, -0.036522705, -0.05272332, 0.042958565, -0.034271743, 0.00069401466, -0.048316497, -0.023460766, 0.03019781, 0.019624613, -0.028168771, 0.018055279, -0.03240122, 0.02273158, -0.008195416, -0.04885546, -0.007910083, 0.0007831814, 0.02230358, 0.0031148924, 0.01840402, -0.07063593, -0.0045693014, 0.067719184, 0.028818699, 0.038266413, 0.051867317, -0.01594698, -0.039376043, -0.0038599302, -0.068670295, -0.02273158, 0.011857199, -0.023809507, -0.05462554, 0.0017050667, -0.005960303, 0.032369517, 0.02357173, 0.010065937, -0.05503769, -0.023698544, -0.018879576, 0.008583787, 0.025220323, 0.016723722, 0.03018196, 0.03060996, 0.002478836, 0.0003784634, 0.021954838, 0.00028236143, -0.0029365588, -0.040771008, 0.009685492, 0.04061249, -0.02442773, -0.024459435, -0.001542585, 0.004751598, -0.013220459, -0.044733975, -0.013085718, -0.01284794, 0.010478086, -0.038615152, -0.014948313, 0.012015717, 0.02934181, 0.021986542, -0.0037846337, -0.016596908, -0.05462554, 0.02247795, -0.011231049, -0.05893725, -0.023032766, 0.053737838, 0.029405218, 0.0033130406, 0.04977487, -0.034461964, -0.025711732, -0.009867788, -0.0070104892, -0.0071095633, 0.031909812, -0.0016198629, -0.024269212, -0.035476483, 0.0012562607, 0.029738106, -0.062202737, 0.04137338, -0.011429198, -0.013878312, 0.045938715, -0.013537496, -0.042768344, 0.005445117, 0.024443582, 0.058747027, 0.038266413, -0.014900757, 0.0023361691, -0.03121233, 0.07989342
|
|||
|
"**Overview**
|
|||
|
Retrieval-Augmented Generation (RAG) enhances language models by integrating them with a retrieval system. This combination allows the model to access external knowledge sources, resulting in more accurate and contextually relevant responses.
|
|||
|
**Example Use Cases:**
|
|||
|
- Providing answers with up-to-date information
|
|||
|
- Generating contextual responses
|
|||
|
**What We’ll Cover:**
|
|||
|
- Technical patterns
|
|||
|
- Best practices
|
|||
|
- Common pitfalls
|
|||
|
- Resources","[-0.02409391, 0.03011419, 0.037144244, 0.027736755, -0.021742037, -0.0082251625, -0.018188665, 0.018252574, -0.011721016, 0.032875083, 0.0043969788, -0.05112766, 0.012909734, -0.0214864, -0.0014419598, -0.02009317, -0.030472085, -0.01021275, -0.041541222, 0.014929277, 0.011567633, -0.018866107, 0.0013405033, -0.00081804255, -0.0339232, -0.009893202, 0.008071779, 0.08159974, 0.0038569428, -0.028887128, 0.022739027, -0.03269614, -0.012877779, -0.010136059, 0.044762265, 0.027787883, 0.042078063, -0.0036140864, 0.0073815556, 0.025257064, 0.012270639, -0.011395077, -0.0006902234, 0.056240425, 0.025129244, 0.04238483, -0.012775524, -0.03177584, 0.012174774, 0.041541222, -0.04018634, -0.033693127, -0.0069917073, -0.023173612, -0.02529541, -0.009669519, -0.029935244, -0.0049753604, 0.0054578776, -0.0057167113, -0.046730682, -0.04133671, -0.0051159617, -0.0111394385, -0.01528717, 0.014302962, -0.036505148, 0.025845032, -0.037860032, 0.017511223, 0.022917973, -0.018073628, -0.00540675, -0.01661649, -0.020080388, 0.027020968, 0.035457034, 0.041438967, -0.004045476, -0.03458786, 0.018725505, -0.046142712, 0.0011495735, -0.042026937, -0.004678181, 0.0070236623, -0.03323298, -0.02549992, -0.03476681, 0.0047644586, -0.03203148, 0.026279617, -0.012366503, 0.031213436, 0.025921723, 0.031264562, -0.035533722, 0.029372841, 0.058847938, 0.040544234, -0.0029318517, -0.07796968, 0.007931178, -0.026433, 0.04274272, -0.012232292, -0.04172017, 0.0084808, -0.011682671, -0.028682617, -0.09289896, -0.023889398, -0.025845032, -0.019875878, -0.008672529, -0.031417947, -0.035457034, -0.00072058046, 0.017907463, 0.007669149, -0.013778904, 0.024285639, -0.002545199, -0.038422436, 0.028452542, -0.010353351, 0.00094905717, 0.0022352373, -0.004186077, 0.023991654, 0.028759308, 0.024183383, 0.044608884, -0.010040194, -0.060688533, -0.022905191, -0.03517583, -0.03998183, -0.04138784, 0.002029129, 0.012896952, -0.03162246, -0.018661596, 0.052866, -0.09320572, -0.01315259, -0.019377382, 0.008857867, -0.010110495, 0.03463899, -0.08497417, 0.00080206513, -0.050437436, 0.022739027, -0.008595838, -0.036811914, -0.024771351, 0.0062855068, -0.0013125429, -0.07878772, 0.00927967, 0.041081075, -0.008493583, -0.020399936, -0.013043944, -0.012820261, -0.06733513, 0.013766122, -0.027915701, -0.0067168963, -0.016744308, -0.05833666, -0.034281097, 0.014942058, -0.0010944514, -0.023122484, -0.006895843, -0.012130037, 0.027813448, -0.018252574, -0.049926158, 0.027583372, -0.04644948, 0.008819521, -0.009560872, -0.020348808, -0.009899593, -0.007368774, -0.044941213, -0.0037610785, -0.010468388, 0.041950244, 0.0826223, 0.022687899, -0.0046046847, -0.0070108804, 0.019466856, -0.028478106, -0.0073432103, -0.044685576, 0.028017957, 0.014584165, 0.022598425, -0.052303597, -0.0060522365, 0.012877779, -0.004198859, 0.042691596, -0.022330005, -0.01462251, 0.023275867, -0.06411409, 0.01528717, 0.031954788, -0.034357786, -0.003310516, -0.04931263, 0.05281487, 0.015875138, -0.022266096, -0.028452542, -0.005422727, 0.0021569482, 0.0046206624, 0.004384197, 0.03939386, 0.034996882, -0.06646596, 0.053786296, -0.06442085, 0.03778334, 0.008755611, -0.021435272, -0.040953256, 0.031878095, 0.0073815556, 0.006934189, 0.012705224, -0.019300692, 0.024311202, 0.012430412, 0.019326255, -0.03451117, 0.016833782, 0.02449015, 0.040007394, -0.010142449, -0.035022445, 0.089882426, 0.0010281453, 0.014878149, -0.027583372, 0.018048063, -0.02583225, 0.03619838, -0.03832018, -0.006755242, 0.03837131, -0.046219405, -0.031392384, -0.02510368, 0.015159351, -0.020719483, 0.023825489, -0.009087942, 0.037348755, -0.010155232, -0.03911266, -0.023314213, -0.009701474, -0.030011937, 0.015900701, 0.034485605, -0.027992394, -0.035866052, -0.025678867, -0.014290181, -0.023787143, -0.0151210055, 0.028350288, 0.0021202, -0.015785664, 0.028248033, 0.034025457, -0.008205989, 0.03057434, 0.03049765, -0.0031922832, -0.03323298, -0.021639781, 0.01769017, -0.053428404, 0.029270586, -0.0348435, -0.005278931, 0.008186816, 0.03236381, 0.009465008, 0.033130724, 0.006116146, 0.017255586, 0.02630518, 0.015964612, -0.00
|
|||
|
"**Technical Patterns**
|
|||
|
This image outlines four key technical patterns involved in data processing and answer generation:
|
|||
|
. **Data Preparation**
|
|||
|
- **Chunking**: Breaking down data into smaller, manageable pieces.
|
|||
|
- **Embeddings**: Converting data into numerical formats that can be easily processed by machine learning models.
|
|||
|
- **Augmenting Content**: Enhancing data with additional information to improve its quality or usefulness.
|
|||
|
. **Input Processing**
|
|||
|
- **Input Augmentation**: Adding extra data or features to the input to improve model performance.
|
|||
|
- **NER (Named Entity Recognition)**: Identifying and classifying key entities in the text, such as names, dates, and locations.
|
|||
|
- **Embeddings**: Similar to data preparation, embeddings are used here to represent input data in a format suitable for processing.
|
|||
|
. **Retrieval**
|
|||
|
- **Search**: Locating relevant information from a dataset.
|
|||
|
- **Multi-step Retrieval**: Using multiple steps or methods to refine the search process and improve accuracy.
|
|||
|
- **Re-ranking**: Adjusting the order of retrieved results based on relevance or other criteria.
|
|||
|
. **Answer Generation**
|
|||
|
- **Context Window**: Using a specific portion of data to generate relevant answers.
|
|||
|
- **Optimisation**: Improving the efficiency and accuracy of the answer generation process.
|
|||
|
- **Safety Checks**: Ensuring that the generated answers are safe and appropriate for use.","[-0.022337275, 0.019790597, 0.05529204, 0.021323672, 0.031776454, -0.005334086, 0.019347146, 0.043356866, -0.034690563, 0.032942098, 0.049489167, -0.013113488, -0.017814072, -0.02749398, 0.010649166, -0.0019020893, -0.027595341, 0.039961297, -0.033829, 0.039277114, 0.04130432, -0.0335756, 0.0040417416, 0.009116092, 0.029141085, -0.006556744, -0.019207776, 0.06314746, 0.0047987765, -0.010604821, -0.0021016423, -0.0032118545, -0.02103226, -0.03808613, 0.039859936, -0.013328879, -0.034817263, 0.048804983, 0.0033385549, 0.009692579, 0.012486322, -0.024465842, -0.01180214, 0.041861802, -0.004111427, -0.00873599, -0.031649753, -0.059650533, -0.011909835, 0.07546274, -0.018700974, 0.016090946, 0.026607078, -0.01738329, -0.0053974357, -0.0061354656, -0.056964487, -0.0063983686, 0.02361695, -0.01710455, 0.05073083, -0.029065065, 0.008945046, 0.0017484651, -0.015558805, -0.019017726, -0.0041272645, -0.017624022, -0.0027984944, 0.04814614, 0.060613457, 0.028608944, 0.019904628, 0.010617491, 0.032257915, 0.004653071, 0.011136963, 0.032384615, -0.0050743497, -0.026708439, 0.021412363, -0.004976157, 0.027722042, -0.059751894, -0.0088436855, 0.026657758, -0.03689515, -0.016078277, -0.07678042, -0.021057602, -0.073182136, 0.0023613782, -0.012676372, 0.05164307, 0.024161762, 0.011669104, -0.0031294993, 0.021044932, 0.018067474, 0.035400085, -0.013062809, -0.033930358, -0.03355026, -0.007868093, 0.06132298, -0.005673009, -0.02360428, -0.0070572104, -0.049438484, -0.0020541297, -0.09061611, -0.020056669, -0.02764602, -0.006072115, 0.049007703, -0.027671361, -0.042191222, -0.004995162, -0.0006441922, -0.00071744085, -0.018700974, 0.022894757, 0.0030946566, -0.033347536, -0.005733192, -0.015900897, 0.007462652, -0.013442909, 0.010535136, -0.032105874, 0.010953247, 0.02357894, 0.036920488, -0.056204285, -0.01682581, -0.0344625, -0.001477643, 0.024554532, -0.031218972, 0.011643764, 0.03157373, -0.0056698415, -0.006262166, 0.07064813, -0.042241905, -0.008248194, -0.012353286, 0.025745515, -0.021703774, 0.0236803, -0.03157373, -0.008716986, -0.03719923, 0.015951578, 0.008463585, -0.018586945, 0.014253791, 0.025124684, -0.018891025, -0.029343806, 0.004371163, -0.02047478, -0.010592151, 0.032891415, -0.03403172, -0.016471049, -0.032587335, -0.009040072, -0.035298724, -0.04705652, 0.015052004, -0.060208015, -0.032815397, 0.021830473, 0.0014119173, -0.018333543, -0.045130674, -0.029850608, -0.021589743, -0.029647887, -0.045688152, 0.016597748, -0.06086686, -0.014165102, -0.023122817, -0.02754466, -0.016065607, 0.020221379, -0.05468388, 0.011022932, -0.032688696, 0.0127460575, 0.032815397, -0.0061164605, 0.009198447, -0.03398104, 0.018042132, -0.028254183, 0.01369631, -0.022539996, 0.03707253, 0.018675635, 0.036210965, 0.03795943, 0.020373419, -0.005106025, -0.011105288, -0.008526935, -0.0068608252, -0.06147502, 0.019739918, -0.05443048, 0.06426243, 0.056660406, -0.079517156, -0.012391296, -0.06674576, 0.014874623, 0.0014918969, 0.019562537, -0.019435836, 0.015837546, 0.02757, 0.009711583, -0.00834322, 0.025606144, 0.017269261, -0.04730992, -0.0007178368, -0.06887432, 0.036033586, -0.0038770314, 0.018523594, -0.0008552275, 0.0021935003, -0.02031007, 0.0063888663, -0.002085805, -0.0079884585, 0.001149014, -0.0028349208, 0.05085753, -0.022527326, 0.052149873, -0.018815005, 0.033448897, -0.024098411, -0.022248585, 0.04459853, 0.0038295188, 0.029774588, -0.07612158, -0.003930879, -0.03119363, 0.016597748, -0.041202962, -0.018675635, 0.038897015, -0.02066483, -0.0018102316, -0.022235915, 0.03839021, -0.03159907, 0.0047987765, -0.037249908, 0.027798062, 0.008058144, -0.022210576, -0.032460634, -0.06238726, 0.008013799, 0.043483566, 0.037401948, -0.015976917, -0.06502263, -0.02736728, -0.040138677, -0.024415161, 0.007956783, -0.0046499036, -0.031497713, -0.035121344, 0.07784471, 0.049210425, -0.0011212983, 0.010066344, -0.014646563, -0.028482243, -0.029014384, -0.060461417, 0.013037468, -0.040164016, -0.0011893997, -0.014836613, 0.02051279, -0.03043343, -0.01330
|
|||
|
"**Technical Patterns: Data Preparation**
|
|||
|
This presentation focuses on the process of preparing data for easier consumption by large language models (LLMs).
|
|||
|
. **Content Chunking**: - Documents are divided into smaller, manageable pieces. This makes it easier for LLMs to process the information.
|
|||
|
. **Embeddings**:
|
|||
|
- Each chunk of content is converted into embeddings, which are numerical representations (e.g., 0.983, 0.123, 0.289) that capture the semantic meaning of the text. These embeddings are then stored in a knowledge base.
|
|||
|
. **Augmenting Content**:
|
|||
|
- Content can be enhanced using LLMs. For example, GPT-4 can be used to rephrase, summarize, and generate bullet points from the text.
|
|||
|
. **Best Practices**:
|
|||
|
- Pre-process content for LLM consumption by adding summaries and headers for each part.
|
|||
|
- Curate relevant data sources to ensure quality and relevance.
|
|||
|
. **Common Pitfalls**:
|
|||
|
- Avoid having too much low-quality content.
|
|||
|
- Ensure documents are not too large, as this can hinder processing efficiency.
|
|||
|
This approach helps in organizing and optimizing data for better performance and understanding by LLMs.","[0.006649426, 0.020125678, 0.06195528, -0.010307528, 0.0359693, -0.0020508005, 0.011763428, 0.022927368, -0.04355466, 0.05079746, 0.013690355, -0.011616615, -0.031002108, -0.033375595, 0.013090867, 0.020088974, 0.011475919, 0.02155711, -0.0154643515, 0.05833388, 0.03946835, -0.0003496378, 0.011121119, 0.027013676, 0.022915134, 0.0026288785, -0.006239572, 0.028163716, 0.010784672, -0.013298852, 0.027282834, -0.010093425, 0.0037070399, -0.0063619167, 0.022756087, 0.023441216, -0.018926702, 0.041597147, -0.009004558, 0.015917026, 0.013959513, -0.02806584, -0.024028469, 0.04468023, 0.006374151, 0.015476585, 0.008631408, -0.013580245, -0.024787005, 0.050161265, -0.0403737, 0.009799798, 0.011696139, -0.017091533, 0.003388944, -0.038734283, -0.031002108, -0.0025753528, 0.00995273, -0.031026578, 0.038073625, -0.007481369, 0.013519073, -0.007560893, -0.04798353, -0.07379823, -0.047029246, -0.03658102, -0.006404737, 0.05275497, 0.05118896, 0.0046215653, -0.013494604, 0.021740627, 0.024126345, -0.020456009, -0.036116112, 0.0258147, -0.005630908, -0.0421844, -0.00071456865, 0.011475919, 0.010380935, -0.04888888, 0.0019590422, 0.019232564, -0.019513955, 0.0298276, -0.04042264, -0.022242239, -0.028383935, -0.011506505, -0.05275497, 0.031369142, 0.055935927, 0.0055483254, 0.008019685, 0.020333664, 0.01930597, 0.047518622, -0.013103101, 0.0028169833, -0.03562673, -0.039859854, 0.045952614, -0.02625514, -0.006808474, -0.049525075, -0.049255915, -0.0145712355, -0.05544655, 0.007940161, -0.017813366, -0.0016684738, 0.046295177, -0.02897119, -0.015941495, 0.008918918, -0.00650873, -0.0030372033, -0.048179284, 0.0061722826, 0.001562187, -0.021336889, -0.007609831, -0.03609164, 0.025545541, -0.009714157, 0.024982758, -0.029215878, 0.046148364, 0.009371593, 0.074483365, -0.064548984, -0.0210922, -0.02155711, -0.027943496, 0.044435542, -0.024897115, -0.019097984, 0.060633957, 0.004291235, 0.00774441, 0.070225775, -0.026132796, -0.0132254455, -0.013090867, 0.010136246, -0.019709706, 0.043921694, -0.044166382, -0.025056165, -0.03388944, 0.031638302, 0.005092592, -0.01290735, 0.016589921, -0.016846845, 0.01392281, -0.05436992, 0.031344675, 0.01941608, 0.019501721, 0.025741294, -0.01189189, 0.042624842, -0.023844954, -0.018938936, -0.057550877, -0.07144922, -0.016932486, -0.061857406, 0.0009038204, -0.018437324, -0.020627292, -0.020284727, -0.06019352, -0.022841727, -0.01725058, -0.029020127, -0.022890665, 0.026353016, -0.07761538, -0.023710374, -0.072672665, -0.014840394, -0.013176508, 0.0327394, -0.033742625, 0.020223554, -0.015219662, 0.01257702, 0.063374475, 0.013347791, 0.010442107, 0.004774496, 0.041890774, -0.0033522407, 0.02323323, 0.017421864, 0.031785116, 0.037608713, -0.011953062, 0.009634634, 0.026108326, -0.0019498663, -0.0015094259, 0.031687237, -0.040031135, -0.067240566, 0.0065393164, -0.007395728, 0.04110777, 0.03653208, -0.05613168, -0.013433431, -0.0628851, 0.015366475, 0.0064353235, 0.018437324, -0.009726392, -0.03572461, 0.043897223, 0.046882432, -0.03687465, -0.0019773939, 0.002925564, -0.06557668, 0.017140472, -0.048326097, 0.049231447, -0.010405404, -0.02963185, -0.015244131, -0.007444666, -0.035382044, 0.0029118003, 0.017911242, -0.02627961, 0.028334998, 0.026964739, 0.02512957, 9.9882855e-05, 0.019795349, 0.0063313306, 0.023796014, -0.03861194, -0.039150257, 0.047934595, 0.023098651, 0.04898676, -0.07360248, -0.022560336, -0.036678895, -0.016051605, -0.0044441656, -0.019587362, 0.0054106875, -0.026989209, -0.002341369, -0.050210204, 0.063374475, -0.028555218, 0.014448891, -0.03699699, 0.004471693, -0.021398062, 0.00041903008, -0.0069185845, -0.033057496, 0.017042596, 0.005217995, 0.01977088, 0.0058083073, -0.08143253, -0.02605939, -0.022022018, -0.008704815, 0.006429206, 0.018938936, -0.02738071, -0.022413522, 0.05500611, 0.04240462, 0.004710265, 0.0009015264, 0.019403845, -0.023979532, -0.032201085, -0.019783113, 0.012313979, -0.025496604, 0.016626624, -0.016088309, 0.008668112, -0.009102435, -0.0035296401, -0.009995
|
|||
|
"**Technical Patterns: Data Preparation - Chunking**
|
|||
|
**Why Chunking?**
|
|||
|
Chunking is a technique used when your system doesn't need entire documents to provide relevant answers. By breaking documents into smaller pieces, you can make data easier to process, which reduces cost and latency. This approach is beneficial for systems that need to handle large volumes of data efficiently. Other methods for data preparation include using graphs or map-reduce.
|
|||
|
**Things to Consider**
|
|||
|
. **Overlap:**
|
|||
|
- Should chunks be independent or overlap with one another?
|
|||
|
- If they overlap, by how much should they do so?
|
|||
|
. **Size of Chunks:**
|
|||
|
- What is the optimal chunk size for your specific use case?
|
|||
|
- Do you want to include a lot of information in the context window, or just the minimum necessary?
|
|||
|
. **Where to Chunk:**
|
|||
|
- Should you chunk every N tokens or use specific separators?
|
|||
|
- Is there a logical way to split the context that would aid the retrieval process?
|
|||
|
. **What to Return:**
|
|||
|
- Should you return chunks across multiple documents or focus on top chunks within the same document?
|
|||
|
- Should chunks be linked together with metadata to indicate common properties?
|
|||
|
These considerations help in designing an efficient chunking strategy that aligns with your system's requirements and goals.","[-0.014558771, 0.00946872, 0.054064922, 0.018336447, 0.026860747, 0.028111797, 0.035593558, 0.03493124, -0.036844607, 0.04660769, 0.03493124, -0.00894745, -0.05592923, -0.0010157104, 0.011964684, 0.022788707, 0.007794523, 0.018324181, -0.023083072, 0.03512748, 0.01616551, 0.021488598, -0.03154605, 0.0082544675, 0.023193458, -0.009474853, -0.008278998, 0.068635955, 0.02433412, -0.043688577, -0.014730483, -0.015674902, -0.0074143023, -0.021795228, 0.022003736, -0.009591372, -0.060933422, 0.0277929, -0.005712508, -0.002347249, 0.014828605, -0.0061908504, -0.00050172256, 0.044866033, 0.023917105, 0.024113348, -0.013405844, -0.015000317, -0.020752687, 0.0555858, -0.0066354633, 0.0061908504, -0.007316181, -0.031963065, 0.026100306, -0.007819054, -0.054408345, -0.006807176, 0.037433334, -0.022383956, 0.031472456, -0.046288796, 0.020580975, 0.047858737, -0.022739647, -0.04037698, -0.04592084, -0.04042604, -0.008187009, 0.049723048, 0.05342713, 0.016729707, 0.009198886, 0.015098439, 0.034195326, 0.008965848, -0.025388926, 0.020298876, -0.02227357, -0.023193458, -0.011713249, -0.01964882, 0.018287387, -0.034857646, 0.008536566, 0.0010164769, -0.042363938, 0.0134916995, -0.02298495, -0.025953125, -0.05131752, 0.0377277, -0.05401586, 0.028430691, 0.038757972, -0.01685236, -0.010738167, 0.012338772, 0.0028623869, 0.0018183131, -0.044890564, -0.034146264, -0.053181827, -0.01950164, 0.06539795, -0.00759828, -0.024321856, 0.00030816268, -0.052396856, -0.032821625, -0.053623375, 0.0012050541, -0.043026257, 0.03652571, 0.018655341, -0.004961266, -0.052396856, -0.027891023, -0.010167835, 0.009370599, -0.015478659, -0.007714799, -0.03998449, -0.013454904, -0.0418488, -0.038610794, 0.012259049, -0.022592464, 0.019415783, -0.0022077328, 0.07167772, 0.025487047, 0.047588903, -0.058921933, -0.020176224, -0.05818602, -0.031938534, 0.050213654, -0.02570782, 0.0017048602, 0.024873788, -0.014853135, 0.01855722, 0.037899412, -0.041063827, 0.016153244, -0.030123286, 0.026443731, -0.0014112624, 0.030295, -0.03505389, -0.030712014, -0.016656118, -0.005936348, 0.027866492, -0.003342262, 0.021623515, -0.022629261, 0.0014380926, -0.03107997, -0.0026446797, -0.02224904, 0.003998449, 0.021378212, -0.021770697, 0.011700983, -0.015159764, 0.01195242, -0.050777853, -0.03220837, -0.023119867, -0.084678814, -0.008929052, -0.015024847, -0.0064698835, -0.030491242, -0.06716414, -0.028602405, 0.014301202, -0.010517393, -0.027719311, 0.028749585, -0.040303387, -0.0151475, -0.027915554, -0.05720481, -0.035863392, 0.01924407, -0.015613576, 0.018777993, -0.018520424, 0.02762119, 0.0023687133, -0.008278998, -0.013025623, -0.02128009, 0.03444063, -0.0070218164, 0.009211152, 0.012718993, 0.010732034, 0.023708597, -0.005436542, 0.036182284, 0.0026753428, -0.011142918, -0.011247172, 0.017698657, -0.0081747435, -0.09311726, -0.009125295, -0.022518873, 0.027989145, 0.03794847, -0.05185719, -0.027989145, -0.05151376, 0.024101082, 0.0071567334, -0.01751468, 0.021145172, -0.034833115, 0.07265893, 0.06794911, -0.0016849294, -0.0055929227, 0.0036580905, -0.062405244, 0.0410393, -0.05749917, 0.02904395, -0.012559546, -0.023524618, -0.014325732, -0.013884186, -0.026517322, -0.010713636, 0.024186939, -0.045381173, 0.0037500793, -0.009781483, 0.015539985, 0.006258309, 0.017293906, -0.011627392, 0.013332252, -0.057646353, -0.03252726, 0.034170795, -0.004234554, 0.027277764, -0.072315514, 0.00423762, -0.028111797, -0.01829965, -0.026689036, -0.005274028, 0.04339421, -0.00050210586, -0.027351355, -0.03713897, 0.033631127, -0.010413139, 0.04452261, -0.03706538, 0.00027769138, 0.00068416714, -0.0014833204, -0.018827055, -0.033385824, 0.001973161, 0.019612025, 0.026836218, -0.004026046, -0.0555858, -0.03314052, -0.017502414, -0.009695626, -0.02158672, -0.0075430865, -0.030000634, 0.004559581, 0.032821625, 0.025437986, 0.032944277, -0.016349487, 0.0236718, 0.015969267, 0.024432242, -0.012387834, 0.04123554, -0.01723258, 0.0075369542, -0.010088112, 0.008554964, -0.00
|
|||
|
"# Technical Patterns: Data Preparation - Embeddings
|
|||
|
## What to Embed?
|
|||
|
When preparing data for embedding, it's important to consider not just the text but also the metadata. This approach can enhance the searchability and relevance of the data. Here are some examples:
|
|||
|
### Examples
|
|||
|
. **Embedding Q&A Posts in a Forum**
|
|||
|
- You might want to include the title of the posts, the original question, and the top answers.
|
|||
|
- Additionally, if the posts are tagged by topic or keywords, these can be embedded as well.
|
|||
|
. **Embedding Product Specs**
|
|||
|
- Besides embedding the text from product descriptions, you can add metadata such as color, size, and other specifications to your embeddings.
|
|||
|
By embedding both text and metadata, you can improve the ability to surface specific chunks or documents during a search.","[0.004258097, 0.008734256, 0.024611507, 0.019260153, 0.035549954, -0.007938625, 0.02369211, 0.017150259, -0.025177289, 0.046016917, 0.029397076, -0.023043819, -0.0039634192, -0.02234838, 0.0013378381, 0.029349929, -0.0057462207, 0.02254876, -0.018682584, 0.052476257, 0.03097655, -0.012895109, -0.046889164, 0.07020409, 0.00955346, -0.005425022, 0.005772742, 0.06761092, 0.04387166, 0.0010372666, 0.02017955, -0.009930649, -0.011681036, 0.0051097167, -0.00046080272, -0.018505778, -0.014474583, 0.0256252, 0.006429874, -0.004753156, 0.0325796, 0.014686751, -0.031990245, 0.03585642, -0.019118708, 0.008439578, -0.037011556, -0.032155264, -0.011286167, 0.05431505, 0.0044349036, -0.0003628223, 0.00884034, -0.04613479, 0.010967915, -0.035903566, -0.043848086, 0.01649018, -0.008551556, 0.010036732, 0.020356355, -0.038944643, 0.016949879, 0.027817603, -0.02107537, -0.039463278, -0.03585642, -0.010278368, -0.030434344, 0.061623063, 0.073975965, 0.022112636, -0.016230864, 0.035267062, 0.034135498, -0.019578407, -0.03731802, 0.067799516, -0.038119547, -0.063461855, 0.0014387653, -0.0005009526, -0.020816054, -0.01968449, -0.061858803, 0.020733545, -0.02557805, 0.0020391718, -0.053466376, -0.020450654, -0.07147709, -0.031895947, -0.05733255, -0.008881595, 0.038873922, 0.06808241, 0.0104728555, -0.005130344, -0.011981607, 0.025507327, -0.017256344, -0.026120257, -0.056672473, -0.025719495, 0.028289087, -0.038779624, 0.0022380794, -0.0013046868, -0.029444225, -0.029538522, -0.042834394, -0.011580845, -0.03392333, 0.029679967, 0.033333976, -0.012694728, -0.034394816, -0.0037011555, -0.027086802, 0.006712765, -0.033286825, 0.00022837544, -0.0029040517, -0.0016516702, -0.0045645623, -0.039769743, -0.044838205, -0.030292898, -0.011056318, -0.050967507, 0.035950717, 0.003253245, 0.040972028, -0.037459467, -0.056248136, -0.020438867, -0.014639603, 0.029703543, -0.01542934, -0.036162883, -0.0030101356, -0.03342827, 0.012918684, 0.025860941, -0.046535548, -0.019248366, -0.013932375, 0.027558286, 0.012753664, 0.017114898, -0.031212293, -0.016089419, -0.043565195, 0.007302121, 0.027157525, -0.019295515, 0.007473034, -0.03236743, 0.03180165, -0.019295515, 0.005743274, 0.0008339387, 0.015853677, -0.014474583, -0.020085253, 0.0037011555, -0.008539768, -0.026615316, -0.031117996, -0.026591742, -0.004888708, -0.069308266, 0.0039339513, -0.009677226, -0.013060128, -0.0162898, -0.031212293, -0.06600787, -0.0058847195, -0.014910706, -0.04816217, -0.02435219, -0.030952977, -0.02329135, -0.021193242, 0.024375765, -0.027110375, 0.02365675, 0.0029629872, 0.009948329, -0.014887133, 0.013967737, 0.047784984, -0.020250272, -0.023550665, -0.015947973, 0.018576501, 0.0012442778, 0.018493991, 0.009093763, 0.030905828, 0.01739779, -0.0020259111, 0.03830814, -0.014969642, -0.01640767, -0.01751566, 0.004390702, -0.090807974, -0.03543208, 0.00043059821, -0.037153002, 0.026544593, 0.04198572, -0.017692467, 0.025790218, -0.064546265, -0.017256344, -0.017008813, -0.016278012, -0.02435219, -0.024847249, 0.05214622, 0.004431957, -0.043470897, 0.015111088, -0.006011431, -0.048515785, 0.015582573, -0.033734735, 0.058935598, -0.019767, 0.013531613, -0.013201574, -0.007337482, 0.015947973, -0.017786764, 0.012635793, -0.017480299, 0.031872373, -0.010832363, 0.027558286, 0.005864092, 0.026049536, -0.026638892, 0.035102043, -0.0055900416, -0.060632944, -0.00822741, 0.014875345, 0.023197051, -0.018470416, -0.010260688, -0.03936898, 0.016207289, -0.047950003, -0.048562933, 0.033899758, -0.0007444303, -0.045333263, -0.0021202082, 0.028265513, -0.0118932035, 0.016761284, -0.004526254, -0.017916422, 0.007602692, -0.04538041, -0.009441483, -0.0650649, 0.013566975, -0.0117753325, 0.012954045, 0.007473034, -0.056531027, -0.011068106, -0.04141994, -0.00039892033, 0.006535958, -0.01862365, -0.012859748, -0.013484465, 0.04530969, 0.023338497, -0.030952977, -0.016773071, 0.00087666704, 0.0255309, -0.024658654, -0.0038337607, -0.002917312, -0.033687588, 0.050401725, -0.0058
|
|||
|
"**Technical Patterns: Data Preparation - Augmenting Content**
|
|||
|
**What does “Augmenting content” mean?**
|
|||
|
Augmenting content involves modifying the original material to make it more accessible and understandable for systems that rely on Retrieval-Augmented Generation (RAG). These modifications can include changes in format, wording, or the addition of descriptive elements like summaries or keywords.
|
|||
|
**Example Approaches:**
|
|||
|
. **Make it a Guide:**
|
|||
|
- Reformat the content into a step-by-step guide with clear headings and bullet points. This structure is more easily understood by a Language Learning Model (LLM). GPT-4 can assist with this transformation using the right prompts.
|
|||
|
. **Add Descriptive Metadata:**
|
|||
|
- Incorporate keywords or text that users might search for when considering a specific product or service. This helps in making the content more searchable and relevant.
|
|||
|
. **Multimodality:**
|
|||
|
- Utilize models like Whisper or GPT-4V to convert audio or visual content into text. For instance, GPT-4V can generate tags for images or describe slides, enhancing the content's accessibility and utility.","[0.00015453182, 0.044317544, 0.021382833, 0.016371032, 0.03630375, -0.021064825, -0.0034917237, 0.028188195, -0.0072378535, 0.009317623, 0.014984519, -0.0013555075, -0.006188428, -0.031673558, -0.0035076241, 0.017414097, -0.017846588, -0.0141322585, -0.022298694, 0.03793195, 0.024130419, 0.0065763975, 0.0046524513, 0.028035551, 0.011200229, -0.019373024, -0.018673407, 0.07067401, 0.020734096, -0.016371032, 0.010780458, -0.008980535, -0.011009424, -0.029002294, 0.06507708, 0.007829348, -7.587463e-05, 0.021675399, 0.01250406, -0.0066018384, 0.016892565, -0.034293942, -0.0052026045, 0.063347116, -0.0009945688, 0.017146971, 0.002127471, -0.037016086, -0.021064825, 0.059531026, -0.031902526, 0.006426934, 0.0062679304, -0.013216397, -0.0024327582, -0.01956383, -0.05311999, -0.013954175, -0.021878924, -0.02711969, 0.006729041, -0.017350495, 0.025313407, -0.02047969, -0.0617698, -0.015213485, -0.038669728, -0.02294743, -0.040348805, 0.031470034, 0.058615163, 0.00021227008, -0.03136827, -0.010392489, -0.00502134, -0.015162603, -0.023570724, 0.0025408808, 0.022871109, -0.05215325, 0.013458082, -0.0051644435, -0.029333023, -0.02717057, -0.018571645, 0.030019918, -0.040730417, -0.005625555, -0.041875243, -0.032716624, -0.025542373, 0.002623563, -0.044139456, 0.015264366, -0.0003826029, 0.026814403, -0.027603062, 0.032487657, 0.010596014, 0.035286125, 0.011588197, -0.01831724, -0.03342896, -0.04042513, 0.042358615, -0.036481835, -0.0061152866, -0.010099922, -0.024550188, -0.02630559, -0.05678344, -0.027323214, -0.0067481217, -0.01752858, 0.05423938, -0.039865434, -0.00040009333, 0.009832796, -0.014272182, -0.00795655, -0.06553501, -0.01586222, 0.02214605, -0.04726865, 0.042587582, -0.04630191, 0.0037493098, -0.007670344, 0.008967815, -0.020314327, 0.018889653, 0.02545333, 0.027221452, -0.042002447, -0.033530723, -0.040781297, -0.038186356, 0.023430802, -0.025249805, -0.015124442, 0.049024053, -0.013826971, -0.0007787212, 0.08140995, -0.061006583, -0.03709241, 0.003548965, 0.03884781, -0.048617005, 0.041926123, -0.084004894, -0.014094098, -0.02425762, 0.036227427, 0.009419385, -0.019334864, -0.003291379, 0.0141449785, -0.015696855, -0.051135626, 0.011944367, -0.010405209, -0.0023182756, -0.02586038, -0.0071678916, 0.013165516, -0.025364287, -0.026076624, -0.051008422, -0.043579765, -0.030706815, -0.08390313, -0.023456242, 0.020377928, -0.00375567, -0.009362144, -0.08044321, -0.058767807, -0.019309422, -0.0066527193, -0.01920766, 0.017337775, -0.062075086, 0.018113714, -0.04759938, -0.04164628, -0.018113714, 0.01588766, -0.045843977, 0.017693944, -0.022934709, -0.02046697, 0.07153899, 0.033479843, -0.010271646, -0.026610877, 0.043554325, -0.015162603, 0.052255012, -0.02714513, 0.04502988, 0.0008888313, -0.0017713024, -0.0029701912, 0.003000402, -0.020148963, -0.026013022, 0.0086307265, -0.020352488, -0.019093178, 0.007867509, -0.025529651, -0.0011957086, 0.055409648, -0.06512796, -0.005132643, -0.057495777, 0.014297622, -0.01878789, -0.013699768, -0.035311565, -0.039814554, 0.011721761, 0.035184365, -0.01705793, 0.01709609, 0.0019636971, -0.03798283, 0.009877317, -0.045309726, 0.051898845, -0.005285287, -0.035260685, -0.002793697, -0.014386665, -0.0063601523, 0.0018969155, 0.0141449785, -0.026534555, 0.014666512, 0.018749729, 0.027832028, -0.001957337, 0.02793379, -0.025796779, 0.040018078, -0.028544364, -0.0499908, 0.039458387, 0.0043376237, 0.035209805, -0.057444897, 0.011804443, -0.015188044, 0.0057781986, -0.017197851, -0.009533868, 0.042358615, -0.03638007, -0.015709577, -0.014284902, 0.035337005, -0.03643095, -0.010983983, -1.9043191e-05, 0.028111873, 0.009686512, -0.00875793, -0.0058577005, -0.04248582, 0.003800191, 0.029154938, 0.030503292, 0.01877517, -0.05815723, -0.014857316, -0.024919078, -0.011200229, 0.03467555, 0.009565669, -0.045157082, -0.017884748, 0.044877235, 0.026458234, -0.022324136, 0.01461563, 0.0343702
|
|||
|
"**Technical Patterns: Input Processing**
|
|||
|
methods for processing input data according to specific tasks, focusing on three main areas: Q&A, content search, and database (DB) search.
|
|||
|
. **Q&A**: - Uses a technique called HyDE, where a large language model (LLM) is asked to hypothetically answer a question. This answer is then used to search the knowledge base (KB).
|
|||
|
. **Content Search**:
|
|||
|
- Involves prompting the LLM to rephrase the input and optionally add more context to improve search results.
|
|||
|
. **DB Search**:
|
|||
|
- Utilizes Named Entity Recognition (NER) to find relevant entities. These entities are then used for keyword searches or to construct a search query.
|
|||
|
highlights different output formats:
|
|||
|
- **Embeddings**: Numerical representations of data, such as vectors (e.g., 0.983, 0.123, 0.289).
|
|||
|
- **Query**: SQL-like statements for database searches (e.g., SELECT * from items).
|
|||
|
- **Keywords**: Specific terms extracted from the input (e.g., ""red,"" ""summer"").
|
|||
|
**Best Practices**:
|
|||
|
- Transform the input to match the content in the database.
|
|||
|
- Use metadata to enhance user input.
|
|||
|
**Common Pitfalls**:
|
|||
|
- Avoid directly comparing input to the database without considering the specific requirements of the task.","[-0.012027161, 0.04333353, 0.04118856, 0.011682434, 0.05316465, -0.012531485, 0.0036547505, 0.054134995, -0.011976091, 0.050049335, 0.029186934, -0.025446001, -0.020492138, -0.018691894, 0.0031280834, 0.0054581864, -0.02147525, 0.050432365, -0.018398238, 0.031561725, 0.061029546, -0.04052464, -0.00080037443, 0.031178692, 0.043818705, -0.01203993, -0.01700656, 0.06281702, 0.021883816, -0.008522431, 0.014057224, -0.012793223, -0.003193518, 0.0013741223, 0.044354945, 0.012308051, -0.02202426, 0.04785329, 0.015168013, 0.012435728, 0.00078321784, -0.010329059, -0.011835646, 0.023709595, -0.019572865, -0.00400267, -0.016036216, -0.02788463, -0.010252453, 0.03986072, -0.003906912, 0.015717024, 0.0025248101, -0.016904417, 0.032429926, -0.013891244, -0.07425687, -0.005764611, 0.021832746, -0.02964657, 0.0013222536, -0.02693982, 0.03511114, 0.018079046, -0.05520748, -0.03184261, -0.03434508, -0.020658119, -0.021666765, 0.0354431, 0.060876336, 0.03240439, 0.007609542, -0.008554351, 0.031178692, -0.019687774, -0.011656899, 0.017900297, -0.031995825, -0.029289076, -0.0038718013, -0.0068690157, -0.01084615, -0.056739602, -0.017530035, 0.025190648, -0.05582033, -0.013623123, -0.035009, -0.050713256, -0.08447102, 0.01346991, -0.0014850417, 0.02711857, 0.05068772, 0.017427893, -0.009039523, 0.03687308, -0.013201789, 0.06680054, -0.008177704, -0.019955896, -0.0026445072, -0.020275088, 0.057301383, -0.022726484, -0.016802277, -0.023786202, -0.018181186, -0.024743779, -0.080589645, -0.022292383, -0.053522147, 0.0027673962, 0.06623876, -0.0383286, -0.028344266, -0.006256167, -0.01551274, 0.025918406, -0.056024615, 0.025190648, -0.010456736, -0.017644944, -0.013495446, -0.026378043, 0.017683247, 0.017427893, -0.009984331, -0.009135281, 0.035647385, 0.0036515587, 0.053624287, -0.036081485, -0.019828219, -0.028727297, -0.017159771, 0.02308398, 0.009773665, -0.02411816, 0.049972728, -0.018972784, -0.020951776, 0.050508972, -0.02650572, -0.012825143, -0.022177473, 0.011133423, -0.0021736987, 0.021666765, -0.014989265, -0.032174572, -0.082836755, 0.0018449308, 0.018181186, -0.027859094, 0.027450528, -0.0013996577, 0.006048692, -0.04203123, 0.031434048, -0.020773027, 0.031485118, 0.02755267, -0.0275016, -0.0104120495, -0.035723988, 0.010552494, -0.052653942, -0.004216529, -0.02009634, -0.057454593, -0.010443969, 0.0014028497, -0.037690215, -0.038839307, -0.008222391, -0.041878015, -0.03643898, -0.0038143466, -0.032327786, 0.0058667525, -0.025816264, -0.013016658, -0.017976904, -0.050508972, -0.049972728, 0.024884224, -0.045197614, -0.0008897482, 0.0010517383, 0.026990892, 0.047010627, -0.007028612, 0.0024418202, -0.013278395, 0.020926239, -0.026403578, 0.019636704, -0.034855787, 0.06603448, 0.011988859, 0.017478963, 0.031587258, -0.0074946326, 0.0026397193, 0.009192735, 0.009045906, -0.054032855, -0.059548493, -0.004082468, -0.023709595, 0.05145378, 0.043869775, -0.044252805, 0.01255702, -0.056892816, 0.025867335, -0.036234695, -0.004870873, -0.019789916, 0.009065058, 0.037332717, 0.008624573, -0.036898617, 0.0056177825, 0.025382163, -0.041826945, 0.026326971, -0.06925194, 0.04565725, -0.002077941, 0.013789102, 0.0019550521, -0.0070477636, -0.008247926, -0.0011913849, -0.016457548, -0.023594687, 0.0006770864, 0.0033834372, 0.0035366495, -0.019074924, 0.03184261, -0.029672107, 0.041367307, -0.0137508, -0.01358482, 0.06991585, 0.011069585, 0.009052291, -0.033374734, -0.0018545067, -0.021079453, 0.03590274, -0.021551857, -0.049385417, 0.050840933, -0.008624573, -0.01998143, -0.031995825, 0.02617376, -0.007111602, 0.014427487, -0.05985492, 0.010884454, -0.0015616477, -0.017874762, -0.038941447, -0.02489699, -0.019317511, 0.017874762, 0.022432826, -0.009109745, -0.06133597, -0.037792355, -0.03373223, -0.0009224654, 0.0035781444, -0.0047591557, -0.035366494, -0.025548143, 0.06572805, 0.01590854, 0.0035334576, 0.03687308, -0.016802277, -0.015640417, -0.019406885, -0.025548143, -0.005838025, -0.027808024, 0.034472756, -0.0467042, -9.90992e-05, -0.
|
|||
|
"**Technical Patterns: Input Processing - Input Augmentation**
|
|||
|
**What is input augmentation?**
|
|||
|
Input augmentation involves transforming the input into something different, such as rephrasing it, splitting it into several inputs, or expanding it. This process enhances performance by helping the language model (LLM) better understand the user's intent.
|
|||
|
**Example Approaches:**
|
|||
|
. **Query Expansion**
|
|||
|
- Rephrase the query to make it more descriptive. This helps the LLM grasp the context and details more effectively.
|
|||
|
. **HyDE**
|
|||
|
- Hypothetically answer the question and use that answer to search the knowledge base (KB). This approach can provide more relevant results by anticipating possible answers.
|
|||
|
. **Splitting a Query in N**
|
|||
|
- When a user query contains multiple questions or intents, consider dividing it into several queries. This ensures each part is addressed thoroughly.
|
|||
|
. **Fallback**
|
|||
|
- Implement a flow where the LLM can ask for clarification if the original query lacks sufficient information. This is particularly useful when using tools that require precise input.
|
|||
|
*Note: GPT-4 can perform these tasks with the appropriate prompt.*","[-0.010276983, 0.030526739, 0.022656977, 0.038065836, 0.007572165, -0.015660163, -0.008749323, 0.04811797, -0.0043184487, 0.034759216, -0.0089411065, -0.004490393, -0.023635738, -0.017842535, -0.041134384, -0.008782389, -0.0027808694, 0.007129078, -0.049519975, 0.050578095, 0.002083172, -0.015779203, 0.019826507, 0.004440794, 0.032034557, -0.029151183, -0.04396485, 0.037166435, 0.0029346275, -0.008544312, 0.051689122, -0.020712683, -0.021493046, -0.009959547, 0.041266646, 0.033330753, 0.002083172, 0.040658228, 0.0003794349, 0.008795615, 0.0014623537, -0.034759216, -0.009820668, 0.090522096, -0.013074385, 0.04200733, 0.0078300815, -0.012644524, -0.054651853, 0.043197714, -0.006464447, 0.0014044879, 0.0008464953, -0.0049698534, 0.011030892, -0.0077374964, -0.05533963, -0.0293099, 0.008524473, -0.032431353, -0.027564004, -0.039018143, 0.047721174, 0.022392446, -0.049387712, -0.004675564, -0.03658447, 0.0006857108, 0.007082785, 0.06898937, 0.019337127, -0.009999226, -0.027590457, -0.019482618, 0.039600108, 0.012141917, -0.021863388, 0.018411273, 0.010052132, -0.020673003, 0.015660163, -0.00075762987, -0.0081739705, -0.05409634, 0.008041706, 0.03809229, -0.06020698, -0.00275111, -0.049969677, -0.060947664, -0.034230154, 0.0067984154, -0.02761691, 0.01714153, 0.013279395, 0.043462243, 0.0033066224, 0.022048557, -0.014284609, 0.059254672, 0.02743174, -0.032087464, -0.02305377, -0.03534118, 0.054493137, -0.036108315, -0.011890614, 0.0019525605, 0.006355328, -0.04608109, -0.046319164, -0.04547267, -0.025791654, -0.035737973, 0.04227186, -0.0488322, -0.023582831, 0.014535912, -0.025685843, -0.010475379, -0.035976052, -0.0121948235, 0.031293873, -0.040737588, 0.0041299714, -0.03944139, -0.032431353, -0.0063718613, 0.00084236206, -0.00674551, 0.019297449, 0.022061784, 0.043462243, 0.00058651215, -0.006811642, -0.062111594, -0.022776015, 0.037589684, -0.014813668, -0.027511097, 0.038859427, 0.002661831, -0.0069835866, 0.035632163, -0.020249756, 0.0054493137, 0.0035777653, 0.037880667, -0.018556764, 0.027511097, -0.044679083, -0.024164796, -0.046901133, -0.016744737, 0.002124505, -0.010819268, 0.010845722, 0.03830391, 0.008041706, -0.06232322, 0.00036951504, -0.007036492, 0.0063354885, -0.009020465, -0.03161131, 0.009866961, -0.027378833, 0.013338915, -0.044599723, -0.037351605, -0.040499512, -0.060788944, -0.023066998, 0.020805268, -0.018636124, -0.030209301, -0.058937237, -0.040922757, -0.016387621, -0.0031859307, -0.027511097, 0.055604164, -0.030897079, 0.020448152, -0.023331527, -0.054493137, -0.036267035, 0.05166267, -0.035632163, -0.0048342817, -0.028384047, 0.011116864, 0.080311246, 0.006147011, 0.0008919614, -0.05015485, 0.06295809, -0.028013704, 0.057932023, -0.040816948, 0.07158176, 0.02938926, 0.033013318, 0.010402634, 0.017988026, -0.007056332, -0.040446606, 0.0006580179, -0.02260407, -0.018821295, 0.00089030806, -0.029680243, 0.012571778, 0.029865414, -0.043382887, 0.017379608, -0.04653079, -0.010706843, -0.042589296, -0.03952075, -0.019482618, -0.00794912, 0.04359451, 0.03126742, -0.007380381, 0.02011749, 0.024085438, -0.01661247, 0.015289822, -0.052059464, 0.0150649715, -0.027564004, -0.020963985, -0.023490245, -0.007380381, -0.011685603, 0.03346302, 0.0015706456, -0.025765201, -0.026810095, 0.02788144, -0.0037397898, 0.017432513, 0.027021717, -0.015395634, 0.043224167, -0.007294409, -0.027405286, 0.06909518, 0.009523072, -0.017710268, -0.040711135, 0.004298609, -0.01748542, -0.011097025, -0.0060709585, -0.0064842864, 0.04227186, -0.046028182, -0.025421312, 0.02700849, 0.006084185, -0.016824095, 0.03986464, -0.0114475265, 0.0065735653, 0.022220502, 0.007572165, -0.009985999, -0.016189223, -0.007453127, 0.05274724, 0.018093837, 0.006629778, -0.039018143, -0.045446217, -0.0014590471, -0.0076845903, -0.034230154, 0.025844561, -0.030685456, -0.036875453, 0.06338134, 0.0017673897, -0.00030834254, 0.024614496, 0.026915906, -0.04012917, -0.028754389, -0.040896304, 0.023278622, -0.0125387125, 0.059836637, -0.042853825, 0.0016376048, 0.018927107, -0.008431887,
|
|||
|
"Technical Patterns: Input Processing - NER
|
|||
|
**Why use NER?**
|
|||
|
Named Entity Recognition (NER) is a technique used to extract relevant entities from input data. This process is beneficial for creating more deterministic search queries, especially when the scope is very constrained. By identifying specific entities, such as names, dates, or locations, NER helps in refining and improving the accuracy of searches.
|
|||
|
**Example: Searching for Movies**
|
|||
|
Consider a structured database containing metadata on movies. By using NER, you can extract specific entities like genre, actors, or directors' names from a user's query. This information can then be used to search the database more effectively.
|
|||
|
**Note:** After extracting the relevant entities, you can use exact values or embeddings to enhance the search process.","[-0.02420015, 0.03751325, -0.008720503, -0.0025392054, 0.040313467, -0.006614305, -0.00047487512, 0.06870187, -0.009746444, 0.048496857, 0.013470009, -0.014906326, -0.043161962, -0.029547116, -0.0033976769, 0.022860391, 0.0112189725, 0.04004793, -0.027229695, 0.028460825, 0.101869956, 0.024127731, -0.021508561, -0.003379572, 0.056487132, 0.022268966, 0.008714468, 0.10515297, 0.028629804, -0.03140588, -0.037102874, -0.0005555926, 0.011357776, -0.0077066314, 0.04002379, -0.030029912, -0.019673938, -9.5757685e-05, -0.003868403, 0.0077971555, 0.004909432, -0.008515314, -0.02645722, 0.064549826, -0.049293473, 0.008998111, -0.032492172, -0.030488567, -0.009836969, 0.022884531, -0.020808509, -0.008527384, 0.001155693, -0.0038020185, -0.0140010845, -0.02797803, -0.058804553, -0.00021273199, 0.018961813, -0.009625745, 0.0021710733, -0.01024131, 0.03862368, 0.011104308, -0.029329857, -0.006517746, -0.06314972, -0.01942047, -0.004471898, 0.05431455, 0.085985966, 0.002530153, -0.025201952, -0.0061465967, 0.02773663, -0.003132139, -0.013663127, -0.011562964, -0.008123043, -0.0140010845, 0.013168261, -0.00484003, 0.001861782, -0.058949392, -0.015896058, -0.015437403, -0.04716917, -0.013675197, -0.05412143, -0.03027131, -0.047579546, 0.024658807, -0.025515769, 0.025298512, 0.008702398, 0.026988298, -0.037754647, -0.010790491, 0.016282296, 0.06179789, -0.037199434, 0.007121241, -0.035123408, -0.013602777, 0.0435482, -0.019010093, -0.027302114, -0.015002886, -0.016270226, -0.058707993, -0.075509295, -0.010078367, -0.030512707, 0.016065037, 0.06691553, -0.03980653, -0.021315444, 0.045141425, -0.012769954, 0.051176377, -0.015425333, 0.006019863, -0.018189339, -0.025708888, -0.011412091, 0.000709861, -0.015244284, 0.03155072, 0.028702222, -0.02764007, 0.03275771, 0.019758428, 0.05421799, -0.01324068, -0.061846167, -0.04381374, -0.006638445, -0.0053318786, 0.01937219, 0.01926356, 0.023560446, -0.009698165, 0.0028635839, 0.036499377, -0.023825983, -0.0055612065, -0.034085397, -0.0044175833, 0.018720414, 0.035533786, -0.029740235, -0.02534679, -0.0579838, -0.009360207, 0.010742211, -0.036523517, 0.0265055, -0.011689698, -0.017247887, -0.036451098, 0.010518918, -0.019661868, 0.012613046, 0.053542078, -0.004333094, 0.0192877, -0.021291304, 0.011261217, -0.025950285, 0.02292074, -0.030560987, -0.045334544, -0.017875522, 0.022715552, -0.044465512, -0.032419752, 0.019842915, -0.018225549, -0.009981807, -0.026312383, -0.045382824, -0.0042908494, -0.04238949, 0.004040399, -0.01460458, -0.0035877777, -0.030416148, 0.035340667, -0.03852712, 0.0051779873, -0.0033614673, 0.04588976, 0.061025415, 0.0082437415, -0.013699337, -0.0265055, 0.015377053, -0.02766421, 0.06759144, -0.026215823, 0.036113143, 0.007145381, 0.003569673, 0.05445939, -0.008599804, -0.02050676, -0.016753022, -0.03623384, -0.016040897, -0.029353997, 0.031888675, -0.035678625, 0.015437403, 0.030681686, -0.035702765, 0.00548577, -0.026722759, 0.045286264, -0.0558595, -0.029667815, 0.010108542, 0.011912991, 0.044103414, 0.025926145, -0.015196004, -0.01931184, 0.020132594, -0.048907235, 0.037151154, -0.05441111, -0.0020367957, 0.01564259, 0.024308778, 0.01695821, -0.012999282, 0.005633626, -0.024055311, 0.0074290237, -0.025660608, 0.023150068, -0.020977486, -0.017887592, 0.003195506, 0.030054051, -0.054845627, 0.0386961, -0.026336523, -0.0076764566, 0.049100354, 0.0065780957, 0.033988837, -0.017320307, 0.0017682404, -0.0058297617, 0.018998023, -0.022365525, -0.008811027, 0.043113682, 0.005120655, 0.01814106, 0.04487589, 0.0044568107, -0.0035606206, 0.017851382, -0.042920563, -0.04323438, 0.0045956145, -0.0051629, 0.008117008, -0.007012612, -0.013482079, 0.0077850856, 0.008159253, -0.023874262, -0.10071125, 0.014918396, -0.044272393, 0.010024052, -0.01150865, -0.0008245251, -0.045431104, -0.027253835, 0.06334284, 0.005696993, -0.01460458, 0.007350569, -0.008811027, -0.04098938, -0.013964875, -0.04323438, 0.029474696, -0.041568737, 0.021267164, -0.0266262, 0.0009173124, -0
|
|||
|
"Technical Patterns: Retrieval
|
|||
|
This diagram illustrates a retrieval process using technical patterns. The process begins with three types of input: embeddings, queries, and keywords.
|
|||
|
. **Embeddings**: These are numerical representations (e.g., 0.983, 0.123, 0.289) used for semantic search. They are processed through a vector database (vector DB).
|
|||
|
. **Query**: This involves structured queries (e.g., ""SELECT * from items..."") that interact with a relational or NoSQL database.
|
|||
|
. **Keywords**: Simple search terms like ""red"" and ""summer"" are also used with the relational or NoSQL database.
|
|||
|
The results from both the vector and relational/NoSQL databases are combined. The initial results undergo a re-ranking process to ensure accuracy and relevance, leading to the final result, which is then used to generate output.
|
|||
|
**Best Practices**:
|
|||
|
- Combine semantic search with deterministic queries for more effective retrieval.
|
|||
|
- Cache outputs where possible to improve efficiency.
|
|||
|
**Common Pitfalls**:
|
|||
|
- Incorrect element comparison during text similarity checks can occur, highlighting the importance of re-ranking to ensure accurate results.","[-0.019661661, 0.047749747, 0.042262167, -0.0069830106, 0.054199606, 0.016553765, 0.020311847, 0.047645718, -0.017555054, 0.014941302, 0.036826603, -0.04616329, 0.020753976, -0.046111275, 0.017268972, 0.015760537, -0.006313318, -0.004483041, -0.049622286, 0.015084343, 0.049960386, -0.006144269, -0.01229504, 0.03591634, 0.014226096, -0.009908853, 0.011898425, 0.06678723, 0.022951609, -0.021508193, -0.0074836547, -0.021651234, -0.02733387, -0.01330283, 0.048946094, 0.02722984, -0.02764596, 0.028764281, 0.008953078, 0.009681287, 0.02635859, 0.019999757, -0.020753976, 0.039167278, 0.01590358, -0.006345827, -0.014772253, -0.055447966, -0.015643504, 0.04761971, -0.0078672655, -0.026449615, 0.00040088105, -0.0069244937, 0.010890636, -0.0034459922, -0.06434253, -0.0011036928, 0.008146846, 0.01843931, 0.02007778, -0.003358217, 0.02681372, -0.0071780668, -0.054511696, 0.0048471456, -0.0114302905, 0.0017928912, -0.014161077, 0.03934933, 0.059973266, 0.017789122, 0.030922903, -0.009382201, 0.037450783, 0.011261242, 0.008140344, 0.023081645, -0.014707235, -0.034303878, -0.0060207336, -0.035240147, 0.027775997, -0.031104956, -0.04462885, -0.0133678485, -0.041377913, -0.03269141, -0.02438202, -0.055968113, -0.058360804, 0.033367608, -0.0026836477, 0.041273884, 0.034199845, 0.020597931, -0.024408028, 0.04390064, -0.008595475, 0.072977014, -0.011475804, -0.023185676, -0.02024683, -0.0052535124, 0.031911187, -0.030064655, -0.038673136, -0.009590262, -0.023913885, -0.030454768, -0.08520053, -0.039583396, -0.02348476, 0.035396192, 0.051702887, -0.005331535, -0.058724906, 0.03393977, -0.00923916, 0.035656266, -0.026254559, 0.02490217, -0.02105306, -0.011085692, -0.01403104, -0.031469062, -0.024134949, -0.009811325, 0.01976569, -0.03084488, 0.05425162, 0.006098756, 0.040545672, -0.032743428, -0.03157309, -0.054719754, -0.02459008, 0.028140102, -0.0024690859, 0.0042587263, 0.024928177, -0.046709448, -0.03498007, 0.028010065, -0.026839728, -0.008010306, -0.00019017975, 0.018465316, 0.014083055, 0.03393977, -0.024668103, -0.04522702, -0.036774587, 0.0143431295, 0.0047496175, -0.013159789, 0.013114275, -0.028764281, -0.01625468, -0.017386006, -0.043094408, -0.016631788, -0.01236656, 0.029388461, -0.029778574, -0.0074381414, -0.039193284, -0.014200089, -0.030246709, -0.027385885, -0.0007343052, -0.08457635, -0.034199845, 0.016241677, 0.004408269, -0.013419864, -0.029934619, -0.03573429, 0.004674846, 0.0072951005, -0.029258424, 0.0002759232, -0.032561377, 0.0034915053, -0.0016197788, -0.013796972, -0.0340438, 0.010669572, -0.04421273, 0.019713676, -0.0055298423, 0.040571682, 0.033991788, -0.019505616, -0.0026348836, 0.0031810408, 0.03373171, -0.0043497523, 0.019141512, -0.0026332582, 0.03170313, -4.0662097e-05, 0.024343008, 0.04358855, -0.03053279, -0.0033484641, 0.0017148687, -0.0076982165, -0.019414589, -0.041247874, -0.0027649212, -0.03157309, 0.016033616, 0.02959652, -0.058776923, 0.00045025462, -0.029544506, 0.039401345, -0.02670969, -0.01646274, -0.040727727, -0.011865917, -0.0018221496, 0.00063962163, 0.0028787039, 0.043250453, 0.025695398, -0.075525746, 0.015851565, -0.060909536, 0.025383309, 0.009999879, 0.034329884, -0.021794274, 0.012704657, 0.0075096623, 0.01517537, 0.011144209, -0.03180716, -9.7070915e-05, -0.029752566, 0.0008842546, -0.015812553, 0.0260465, -0.019089496, 0.028452192, -0.018972462, 0.0041937074, 0.04192407, -0.008764523, 0.013263819, -0.04504497, -0.014681227, -0.0040961793, 0.049232174, -0.027411893, -0.043822616, 0.030922903, -0.006898486, -0.016696807, -0.020298844, 0.03747679, 0.005929707, 0.019258546, -0.07089641, 0.030870888, -0.00042058984, -0.044472806, -0.03362768, -0.05602013, 0.0009736553, 0.05466774, 0.039375335, -0.009999879, -0.049986392, -0.048712026, -0.04080575, -0.016293691, 0.0069765085, 0.016865855, -0.038048957, -0.009115624, 0.051312774, 0.018569347, 0.008582471, 0.014941302, 0.007613692, -0.004222966, -0.019284552, -0.030896896, -0.0025926214, -0.0585688
|
|||
|
"Technical Patterns: Retrieval - Search
|
|||
|
**How to search?**
|
|||
|
There are various approaches to searching, which depend on the use case and the existing system. Here are three main methods:
|
|||
|
. **Semantic Search**:
|
|||
|
- This method uses embeddings to perform searches. - By comparing embeddings with the data in your database, you can find the most similar matches.
|
|||
|
. **Keyword Search**:
|
|||
|
- If you have specific entities or keywords extracted, you can search for these directly in your database.
|
|||
|
. **Search Query**:
|
|||
|
- Based on extracted entities or direct user input, you can construct search queries (such as SQL or Cypher) to search your database.
|
|||
|
Additionally, you can use a hybrid approach by combining several methods. This can involve performing multiple searches in parallel or in sequence, or searching for keywords along with their embeddings.","[-0.023080256, 0.033239882, 0.061518587, 0.00027485323, 0.033239882, 0.013546169, -0.0114538465, 0.06704059, 0.0011337906, 0.008574207, 0.008762947, -0.066048354, 0.020513386, -0.02469803, -0.002062663, 0.01267257, -0.0055705383, 0.026962915, -0.0067730844, 0.011788187, 0.053623844, 0.02269199, -0.026078532, 0.04538398, 0.024633318, -0.00066733215, 0.011820542, 0.075064756, 0.017008206, -0.029637637, 0.0058132047, 0.00081630226, -0.018550485, -0.0029767058, 0.03451253, 0.02279984, -0.051596235, 0.035289064, -0.008843836, -0.0049180356, 0.009183569, 0.019575076, -0.018216146, -0.0038772672, -0.009641939, -0.016814074, -0.034555674, -0.05138053, -0.019359373, 0.03947371, 0.005441116, -0.037942212, -0.010526322, -0.015519854, 0.031471115, -0.022012524, -0.059879243, -0.031492684, 0.012435297, 0.042579837, -0.027804159, 0.0040740967, 0.020006483, -0.018388707, -0.037532378, 0.00017728117, -0.023641083, 0.026509939, -0.046031088, 0.046764478, 0.06039693, 0.032614343, 0.041889586, 0.0012969162, 0.014128568, 0.012122527, 0.04538398, 0.0093669165, -0.03196723, -0.015832623, 0.006465707, -0.030824004, 0.0056352494, 0.008692844, -0.030953426, 0.0064441366, -0.0598361, -0.017213125, -0.010181197, -0.043701492, -0.045858525, 0.046333075, -0.0004957806, 0.0095880125, 0.05862816, 0.02592754, -0.0021880406, 0.013384391, 0.0052874275, 0.087877534, -0.013114762, -0.015455143, -0.016760148, -0.018550485, 0.022993974, -0.018798545, -0.03770494, -0.008951688, -0.006530418, -0.034555674, -0.086669594, -0.026898203, -0.002774484, 0.020351607, 0.046289932, -0.005759279, -0.02991805, 0.0018280856, -0.012446081, 0.039020732, -0.032312356, 0.006147545, -0.014732537, -0.013416747, 0.0031061277, -0.02041632, -0.034253687, -0.025000015, -0.007981023, 0.018949537, 0.052847315, -0.0009814501, 0.04165231, -0.004532466, -0.013880509, -0.052933596, -0.035267495, 0.03330459, -0.0032247647, -0.0056298566, 0.041415036, -0.05901643, -0.03252806, 0.039840404, -0.046289932, -0.015110018, -0.018108293, 0.006093619, 0.025862828, 0.008541851, -0.015476713, -0.06410702, -0.044434883, 0.015962046, 0.004087578, -0.004931517, 0.025172578, -0.01974764, -0.032096654, -0.004394955, -0.019089743, 0.008709022, 0.031686816, 0.011151861, -0.035353772, -0.016619941, -0.047066465, -0.017072918, -0.03116913, -0.008067304, 0.012704926, -0.062079415, 0.009016398, 0.023490092, 0.01022973, -0.026337376, -0.014106997, -0.010742025, -0.018981893, 0.005921056, -0.01655523, -0.021365413, -0.04236413, -0.0026248398, 0.044478025, -0.0026706767, -0.02148405, 0.014818818, -0.061993133, 0.035224352, 0.00440574, 0.041932724, 0.06729943, -0.012478437, 0.01952115, 0.014764892, 0.010461611, 0.0024401438, 0.021311488, -0.036000885, 0.024676459, -0.016587585, 0.006250004, 0.012413726, -0.033498727, -0.02208802, 0.021430125, 0.005931841, -0.043377936, -0.0143227, -0.016123824, -0.012586289, 0.020556526, 0.034771375, -0.06056949, 0.020599667, -0.013039266, 0.03306732, -0.038136348, -0.051639374, -0.006147545, -0.009512517, 0.02722176, 0.014333486, 0.023144966, 0.014559974, 0.0064926697, -0.0700173, 0.005209235, -0.0351165, 0.03830891, 0.012931414, 0.03401641, 0.0013663457, -0.0061852927, -0.007905527, 0.013287324, 0.0084825335, -0.03114756, -0.034879226, -0.03369286, -0.024201913, 0.0048533245, 0.037467666, -0.045901667, 0.022584138, -0.0056460346, 0.0022150034, 0.050992265, -0.0033838458, -0.014775678, -0.034728233, 0.007851601, 0.010515537, 0.04857639, -0.032743763, -0.037553947, 0.014301131, 0.0008452874, -0.0030683798, -0.009647331, 0.048360683, 0.03194566, 0.007608935, -0.06949961, -0.033951703, -0.01822693, -0.037295103, -0.034275256, -0.04538398, -0.03761866, 0.03248492, 0.046764478, -0.046635058, -0.0653581, -0.03587146, -0.048446964, -0.00060430635, 0.05798105, -0.0062877517, -0.037532378, -0.010952336, 0.023576373, -0.007576579, 0.055608317, 0.03233393, -0.0015665453, -0.030392598, -0.
|
|||
|
"**Technical Patterns: Retrieval - Multi-step Retrieval**
|
|||
|
**What is multi-step retrieval?**
|
|||
|
Multi-step retrieval involves performing several actions to obtain the necessary information to generate an answer. This approach is useful when a single step is insufficient to gather all required data.
|
|||
|
**Things to Consider**
|
|||
|
. **Framework to be Used:**
|
|||
|
- When multiple steps are needed, decide whether to manage this process yourself or use a framework to simplify the task.
|
|||
|
. **Cost & Latency:**
|
|||
|
- Performing multiple steps can significantly increase both latency and cost.
|
|||
|
- To mitigate latency, consider executing actions in parallel.
|
|||
|
. **Chain of Thought:**
|
|||
|
- Use a chain of thought approach to guide the process. Break down instructions into clear steps, providing guidelines on whether to continue, stop, or take alternative actions.
|
|||
|
- This method is particularly useful for tasks that must be performed sequentially, such as ""if this didn’t work, then do this.""","[-0.02147403, 0.0017846485, 0.034223832, 0.012607417, 0.01251681, 0.019674819, 0.0053264396, 0.054053977, -0.036087763, 0.042999834, 0.052811358, -0.03634664, 0.008640094, -0.048332747, 0.018315703, 0.014134805, -0.0033039458, -0.014160693, -0.032877658, 0.025939696, 0.04481199, -0.011584844, -0.027234092, 0.016218781, -0.008077031, -0.03409439, -0.0077146003, 0.060888387, -0.015273873, -0.0020338197, 0.03424972, -0.014963218, -0.049471814, 0.0036631408, 0.03202336, 0.0430775, -0.030884288, 0.02938279, -0.013500551, 0.029693445, 0.041032355, -0.007824624, -0.041239455, 0.020438513, 0.052578367, 0.005624151, -0.037149165, -0.028683815, 0.0027425014, 0.07569628, -0.011371269, -0.013015152, -0.0006827939, -0.0009796959, -0.0142513, -0.017150747, -0.050869763, -0.04421657, -0.010251616, 0.043206938, 0.013157535, -0.043517593, 0.012199682, -0.03401673, -0.011410101, 0.0015783542, 0.03261878, 0.023415623, -0.01624467, 0.04768555, -0.0024237565, 0.036294863, 0.032541115, -0.021305759, 0.04245619, 0.0064363843, -0.0069832667, 0.022457771, 0.02222478, -0.033783738, 0.023972213, -0.045252085, 0.024761796, -0.033343643, 0.00096270704, 0.020813888, -0.024347588, -0.024917124, -0.019454772, -0.06632485, -0.06270054, 0.03598421, -0.010471663, 0.06125082, 0.025240723, -0.017513178, -0.020995103, 0.046753585, -0.010840567, 0.032567002, 0.003248934, -0.048617516, -0.03013354, -0.008983108, 0.016399998, -0.014769059, -0.02278137, 0.043854136, -0.04108413, -0.020788, -0.08693164, -0.025447825, -0.032774106, 0.012109075, 0.057108752, -0.016503548, -0.02533133, 0.020619728, -5.971413e-05, 0.020089027, 0.012477977, 0.03349897, -0.019661875, -0.018846406, 0.018872295, -0.036631405, 0.013526439, 0.0009489541, 0.03409439, 0.0015856351, 0.04520031, 0.0038281763, 0.04615816, -0.022664875, 0.0012693171, -0.069638506, -0.010031569, 0.03062541, -0.034301493, -0.0020224939, 0.0157528, -0.054571737, -0.0038152323, 0.05638389, -0.03510402, 0.043025725, -0.009759746, 0.021020992, -0.003601657, 0.034456823, -0.057315856, -0.036501966, -0.024593525, 0.0012143053, 0.030055875, -0.012477977, -0.019856036, -0.01611523, -0.026496286, -0.018212153, -0.052889023, -0.020063138, -0.03186803, 0.008905444, -0.014432516, 0.024282869, -0.03173859, 0.006866771, -0.020153746, -0.011332437, -0.0010986186, -0.097442135, -0.018639302, 0.016464718, 0.019182948, -0.047892652, -0.055296596, -0.020322017, 0.0017668506, -0.0027473555, -0.039168425, 0.016762428, -0.040980577, -0.010995894, -0.0070674024, -0.051827617, -0.03549234, 0.01317048, -0.029020358, 0.017694393, 0.010135121, 0.030884288, 0.031220831, -0.012937488, 0.0016924228, -0.023325017, 0.025939696, -0.0023752167, 0.0018736382, -0.022069452, 0.025551377, -0.030159427, 0.03223046, -0.0024900944, 0.006442856, -0.013798261, -0.005161404, 0.03173859, -0.011953747, -0.06881009, -0.018160377, -0.059593994, 0.010290449, 0.04802209, -0.055244822, -0.007365113, -0.018458087, -0.001629321, -0.020076083, 0.0046921857, -0.009869769, -0.021810573, 0.0187558, 0.034456823, 0.010879398, 0.024399364, 0.025305443, -0.051620513, 0.023907494, -0.05648744, 0.017564954, 0.012827464, 0.028295496, -0.022975529, 0.0072615617, 0.025357218, 0.011546012, -0.0026049719, -0.027234092, -0.018082712, -0.009326124, 0.023506232, -0.008361799, 0.010808207, -0.038158793, 0.025046563, -0.010769375, -0.025667872, 0.029952323, 0.009824466, -0.012173794, -0.054571737, -0.01872991, -0.006866771, 0.017992105, -0.016969532, 0.0058150743, 0.042145535, -0.01847103, -0.015325649, -0.0058830297, 0.011332437, 0.018652247, 0.029434565, -0.039194312, 0.042766843, -0.011416573, -0.015843406, -0.03523346, -0.029356902, -0.03202336, 0.035647668, 0.044760212, -0.003601657, -0.05560725, -0.04121357, 0.023415623, -0.027984843, -0.026043247, 0.051594626, -0.048695177, 0.0025451062, 0.055969685, -0.018613415, 0.029538117, 0.022250667, 0.03298121, 0.007455721, -0.04069581, -0.019325333, 0.0003120708, -0.029046247, -0.017409626, -0.0246453
|
|||
|
"**Technical Patterns: Retrieval - Re-ranking**
|
|||
|
**What is re-ranking?**
|
|||
|
Re-ranking involves re-ordering the results of a retrieval process to highlight more relevant outcomes. This is especially crucial in semantic searches, where understanding the context and meaning of queries is important.
|
|||
|
**Example Approaches**
|
|||
|
. **Rule-based Re-ranking**
|
|||
|
- This approach uses metadata to rank results by relevance. For instance, you might consider the recency of documents, tags, or specific keywords in the title to determine their importance.
|
|||
|
. **Re-ranking Algorithms**
|
|||
|
- There are various algorithms available for re-ranking based on specific use cases. Examples include BERT-based re-rankers, cross-encoder re-ranking, and TF-IDF algorithms. These methods apply different techniques to assess and order the relevance of search results.","[-0.030668663, 0.016580926, 0.037034772, -0.0025900134, 0.016484104, 0.018614208, -0.014898629, 0.038777582, -0.030886516, 0.024653539, -0.013688342, -0.019727672, -0.011346437, 0.015770035, 0.047128562, -0.0054402384, -0.011727678, -0.004505292, -0.07271402, 0.033549145, 0.004647501, -0.04838726, -0.0061482564, 0.035485603, 0.009760962, -0.0041573346, 0.035945512, 0.029482583, 0.038366087, 0.0075763944, 0.016145224, -0.021543102, -0.019497719, -0.025996957, 0.00016414512, -0.02326171, -0.027836593, -0.014305588, 0.012405438, 0.0034947027, -0.0029213293, 0.018844163, -0.044441726, 0.030547636, -0.0045869863, 0.02246292, 0.0093978755, -0.069422044, 0.013361565, 0.037518885, -0.035993926, 0.0014871397, -0.02778818, 0.0051497696, 0.02904688, -0.005101358, -0.036332805, 0.012344924, 0.02807865, -0.0017760956, 0.008423595, -0.023164887, 0.012242049, 0.020199684, -0.048532493, -0.02297124, -0.03415429, 0.014983349, 0.02478667, 0.020937959, 0.025561254, 0.016641442, 0.044707987, -0.030281372, 0.016472, -0.0012503774, 0.030934926, 0.042650502, -0.011673215, -0.043086205, -0.01845687, -0.037228417, 0.018723134, -0.022366097, -0.022523435, 0.005733733, -0.032024186, -0.02580331, -0.016641442, -0.009767014, -0.06990615, 0.0074795713, -0.016871396, 0.038898613, -0.013107404, 0.011364591, 0.0021058987, 0.061579384, -0.00839939, 0.06917998, -0.023443252, -0.058626287, -0.018819958, -0.019279866, 0.014136148, -0.023213297, -0.020804828, 0.010686831, 0.00810892, -0.054075606, -0.043352466, -0.045288928, -0.078717045, 0.016399384, 0.025440225, -0.036502246, -0.07160056, 0.032193623, -0.040254135, 0.032314654, -0.023104372, -0.009688345, -0.022898624, -0.0058910702, -0.020151272, -0.025730694, 0.014281383, -0.013821473, 0.0047866837, -0.041682273, 0.060127042, 0.032871384, 0.006341902, -0.043352466, -0.05610889, -0.05020269, -0.029603612, -0.00382148, -0.022366097, 0.0076187546, 0.0017261714, -0.024060499, -0.056254122, 0.037349448, -0.05117092, -0.0012117994, -0.013167919, -0.012720113, 0.018517386, 0.018735237, -0.06070798, -0.04804838, -0.034928873, 0.041730683, -0.034735225, -0.0017201198, 0.0043509803, -0.019812392, -0.010765499, -0.025851723, -0.01845687, 0.018360049, -0.008272309, -0.005633884, -0.017948551, 0.013349461, -0.031515863, -0.0010234487, -0.04202115, -0.019751878, 0.01625415, -0.060659565, 0.020211786, -0.0065839593, 0.024883494, 0.021071091, -0.034977283, 0.010462928, 0.012157329, 0.032774564, -0.0060605104, 0.00060363044, -0.035630837, 0.008187589, 0.021301044, -0.022826007, -0.04231162, 0.020514358, -0.043037795, 0.02373372, 0.023406943, 0.061579384, 0.0409561, 0.01701663, -0.033379704, 0.009198179, 0.014850217, 0.030136138, -0.00962783, -0.01806958, 0.02436307, 0.0068078623, 0.027134627, 0.044344902, -0.02343115, -0.0325083, 0.0100695845, -0.0017367613, -0.042674705, -0.045869865, 0.0013676239, -0.009361567, 0.01679878, 0.041875917, -0.09275637, -0.029603612, -0.06719512, 0.019098323, -0.024484098, -0.014329794, 0.024036292, -0.049428105, -0.0081815375, 0.020526461, 0.014656572, 0.044393312, 0.03737365, -0.03555822, 0.002166413, -0.05422084, 0.025779106, 0.013543108, 0.020659594, -0.026214808, 0.00022201195, 0.012865347, -0.006801811, -0.0011921324, -0.0072254115, -0.029313143, 0.0013313153, 0.008701961, 0.01845687, 0.020586975, -0.020998472, 0.03267774, 0.006523445, 0.0011338873, 0.030523429, -0.026166398, -0.011521929, -0.017573362, 0.020526461, -0.05286532, 0.0228018, -0.017839625, -0.03710739, 0.03057184, 0.015782138, -0.029530995, -0.026553689, 0.042844146, 0.017597567, 0.0154553605, -0.04344929, -0.030426607, -0.008151281, -0.038874406, -0.01798486, -0.04991222, -0.037954587, 0.03855973, 0.0185779, -0.0053555183, -0.018105889, 0.0038577886, 0.0144145135, -0.02546443, 0.006245079, -0.0058033243, -0.012853244, 0.0029515866, 0.05451131, -0.0053
|
|||
|
"**Technical Patterns: Answer Generation**
|
|||
|
This diagram illustrates the process of generating answers using a language model (LLM). Here's a breakdown of the components and concepts:
|
|||
|
. **Process Flow:**
|
|||
|
- A piece of content is retrieved and used to create a prompt.
|
|||
|
- This prompt is fed into the LLM, which processes it to generate a final result.
|
|||
|
- The user then sees this final result.
|
|||
|
. **Best Practices:**
|
|||
|
- It's important to evaluate performance after each experiment. This helps determine if exploring other methods is beneficial.
|
|||
|
- Implementing guardrails can be useful to ensure the model's outputs are safe and reliable.
|
|||
|
. **Common Pitfalls:**
|
|||
|
- Avoid jumping straight to fine-tuning the model without considering other approaches that might be more effective or efficient.
|
|||
|
- Pay close attention to how the model is prompted, as this can significantly impact the quality of the output.
|
|||
|
By following these guidelines, you can optimize the use of LLMs for generating accurate and useful answers.","[0.010361635, 0.0037253816, 0.04959164, 0.020936912, 0.00921331, -0.0053343726, 0.00300434, 0.030497389, -0.004696785, 0.06809837, 0.018867256, -0.019641707, -0.0034616673, -0.02159119, -0.0077311685, -0.039149888, 0.0008996329, 0.0004493992, -0.03906977, 0.009199956, 0.032206524, -0.012591523, 0.0018843889, 0.031138316, -0.0027372877, -0.004369646, -0.029108716, 0.04475799, -0.014794705, -0.007290532, 0.01827974, -0.014661179, -0.032366756, -0.02041616, 0.018159566, 0.027225997, 0.032874156, 0.041099373, 0.0050573056, 0.01929454, -0.031886064, -0.008779349, -0.02046957, 0.042301107, 0.008906199, 0.03645266, -0.0008428843, -0.033888955, -0.010608658, 0.040565267, -0.03906977, 0.008625794, 0.04852343, -0.0052642715, -0.011937245, -0.041686885, -0.046573948, -0.027613223, 0.012050741, -0.00635251, 0.010001115, -0.03559809, -0.013446091, 0.03706688, 0.0065628137, -0.04761545, -0.025583625, -0.009206633, 0.0114899315, 0.057095814, 0.03386225, 0.007704463, 0.025062872, 0.012684992, -0.019067544, 0.02209859, 0.02046957, 0.037707806, 0.008438857, -0.027105823, 0.01339268, -0.0031846005, 0.009146546, -0.06275733, -0.012231002, 0.028681433, -0.021177258, -0.001341104, -0.07060867, -0.077391796, -0.071303, -0.010067877, 0.0032029604, 0.06350507, 0.0463336, 0.00028812455, -0.013586293, 0.021911653, 0.030737737, 0.02021587, 0.030764442, -0.025223104, -0.025690446, -0.015756095, 0.052422397, -0.007958163, -0.047642156, -0.0016482143, -0.05923223, -0.00032234064, -0.079848684, -0.025757208, -0.0150617575, -0.0008979638, 0.03183265, -0.031004788, -0.046413716, 0.021858243, 0.031298548, -0.014233896, -0.017238235, 0.027586518, -0.0069433637, -0.043663073, 0.027506402, -0.021604544, 0.018733729, 0.005361078, 0.029429179, -0.005020586, 0.016730836, 0.024008015, 0.040698793, -0.028441086, -0.04053856, -0.01623679, -0.011970626, 0.0048636924, -0.02133749, -0.010107935, 0.01827974, 0.0037621013, -0.02255258, 0.05015245, -0.02219206, -0.032126408, -0.013860022, 0.012972073, -0.060514085, 0.030897968, -0.030817851, -0.01751864, -0.062703915, 0.03605208, 0.0033949043, -0.037868038, -0.01650384, -0.0031044846, -0.016223436, -0.02546345, 0.01614332, 0.0014162125, -0.00845221, 0.020509629, -0.048389904, 0.00186436, -0.046760883, 0.004613331, -0.035117395, -0.010361635, -0.0059419167, -0.04705464, -0.039737403, -0.012317794, -0.0068565714, -0.047134757, -0.050099038, -0.0463336, -0.021965064, -0.0036419278, -0.039149888, 0.040912434, -0.06484033, -0.022312231, -0.0305508, -0.02077668, -0.022792926, 0.021898301, -0.0152887525, -0.05891177, -0.036986765, 0.007570937, 0.07600313, 0.009159899, 0.021858243, -0.015542452, 0.054905985, -0.010294871, 0.014167132, -0.007951487, 0.044490937, 0.008352065, 0.048416607, -0.029429179, 0.00695004, 0.061635703, -0.017812397, 0.016023146, -0.022258822, -0.072264396, 0.029669527, -0.045238685, 0.07717816, 0.018813845, -0.05065985, 0.008792702, -0.046253484, 0.032900862, -0.007938134, 0.010381664, -0.040698793, -0.0023567379, 0.02647825, 0.011463226, -0.00939357, 0.03386225, 0.029242244, -0.051113836, 0.01608991, -0.0356515, 0.032954272, -0.014687885, -0.00751085, -0.031992882, 0.03324803, -0.020736622, -0.003798821, 0.021965064, 0.00060170254, 0.0013928454, 0.0448114, 0.033782136, 0.0032663853, 0.01791922, -0.0026555029, 0.018920666, -0.034796935, -0.020790033, 0.039630584, 0.019494828, 0.017612109, -0.081397586, 0.0041927234, -0.01889396, 0.018720377, -0.016877715, -0.028441086, -0.0036652947, -0.028708138, -0.041152783, -0.01189051, 0.04093914, -0.029295653, 0.033888955, -0.06184935, 0.03009681, -0.01940136, -0.01735841, -0.030978084, -0.053437196, 0.012765107, 0.035624795, 0.0095070675, -0.0073239133, -0.04801603, -0.042835213, 0.0068365424, -0.0041726944, -0.0028474466, 0.0063258046, -0.03738734, -0.040965844, 0.06254368, 0.040351626, 0.010268167, 0.0006843219, -0.016116615, -0.0047435192, -0.022365643, -0.033995777, 0.011610105, -0.017652167, 0.0067430744, -0.008131747, -0.0014788029, 0.0022699458, -0.
|
|||
|
"# Technical Patterns: Answer Generation - Context Window
|
|||
|
## How to Manage Context?
|
|||
|
When generating answers using a context window, it's important to consider several factors based on your specific use case. Here are key points to keep in mind:
|
|||
|
### Things to Consider
|
|||
|
- **Context Window Max Size:**
|
|||
|
- The context window has a maximum size, so overloading it with too much content is not ideal.
|
|||
|
- In conversational scenarios, the conversation itself becomes part of the context, contributing to the overall size.
|
|||
|
- **Cost & Latency vs. Accuracy:**
|
|||
|
- Including more context can lead to increased latency and higher costs due to the additional input tokens required.
|
|||
|
- Conversely, using less context might reduce accuracy.
|
|||
|
- **""Lost in the Middle"" Problem:**
|
|||
|
- When the context is too extensive, language models may overlook or forget information that is ""in the middle"" of the content, potentially missing important details.","[-0.023497613, 0.0069228276, 0.077576965, 0.047382336, 0.011729451, -0.025033152, 0.048775934, 0.028104229, -0.008839025, 0.07530592, 0.02593641, 0.0010484245, 0.0033097956, 0.020116847, 4.0979285e-05, -0.003993691, -0.008729344, 0.011213304, -0.041807942, 0.022284666, -0.0021565286, -0.01945876, -0.018194197, 0.04575647, -0.006371195, 0.009884223, -0.016039282, 0.058634352, 0.020129751, -0.0019291011, 0.0066324947, 0.0039582057, -0.060492482, -0.010161653, 0.02131689, 0.003092046, 0.0013823074, 0.034814145, 0.016632851, 0.014077921, -0.010097135, -0.021291083, -0.010484245, 0.04113695, 0.039614316, 0.029110717, -0.008851929, 0.026284808, -0.01134234, 0.050453413, -0.027923577, 0.018632922, 0.008897091, -0.009058388, 0.007961574, -0.007568012, -0.040517576, -0.019445855, 0.011581059, -0.0038001356, 0.0094390465, -0.042272475, -0.012929494, 0.074996226, 0.014645684, -0.01620703, 0.011923006, -0.01778128, -0.00047985584, 0.072828405, 0.01620703, 0.014994084, -0.02372988, -0.0065486208, 0.006403454, 0.06111186, 0.03447865, 0.013729522, -0.016529622, -0.0034194768, 0.02142012, -0.026168676, -0.003296892, -0.04077565, -0.020323306, 0.033627007, -0.018503886, 0.03192372, -0.009819705, -0.05019534, -0.047950096, 0.022826621, -0.0071228347, -0.004264668, 0.019678121, -0.0052453484, 0.010245527, 0.003577547, 0.022116918, 0.02317502, 0.035485137, -0.053576104, -0.01704577, 0.011903651, 0.028904257, 0.014052114, -0.06327968, 0.0049324343, -0.05331803, -0.010103586, -0.09063549, -0.043459617, -0.058685966, 0.021626579, 0.020749127, -0.028078422, -0.028594568, 0.010110038, 0.043046698, 0.02411699, -0.0037291653, 0.051201828, -0.0021887878, -0.023755686, 0.021820134, -0.025523491, -0.024168605, -0.010400371, 0.01176171, -0.0004512258, 0.01880067, 0.02194917, 0.042349897, -0.018607115, -0.04038854, -0.044208027, -0.012458509, 0.013135953, -0.035020605, -0.023071792, 0.0006238126, 0.0022516933, 0.008168033, 0.033343125, -0.04136922, -0.0069292793, 0.000117040465, 0.025781564, -0.037575535, 0.056827836, -0.0465565, -0.061060242, -0.067305624, 0.008193841, 0.042195056, -0.011103622, 0.0012895622, 0.020284595, -0.000441548, -0.066479795, -0.025820276, 0.00038569924, -0.02176852, -0.0220524, -0.024478292, 0.010071327, -0.009613247, 0.024039568, -0.030039782, -0.02436216, -0.01729094, -0.05009211, -0.052363157, -0.0039227204, 0.020013617, -0.04727911, -0.0612667, -0.008768055, -0.024310544, -0.0007633337, -0.027846156, 0.048001714, -0.006006666, -0.05853112, -0.0008919673, -0.07153804, -0.0119165545, -0.010303593, -0.021084623, -0.0644152, -0.006832502, 0.007890604, 0.06813146, 0.008503529, 0.025523491, -0.03450446, 0.04183375, 0.020155558, -0.004632423, -0.02530413, 0.031407572, -0.0024468615, 0.04518871, 0.00861321, 0.0040098205, -0.001769418, -0.013329508, 0.03034947, -0.03339474, -0.04498225, 0.026736438, -0.056414917, 0.061318316, 0.018361945, -0.032646324, -0.018890997, -0.012342376, 0.013600485, -0.008980965, -0.00707122, -0.04469837, 0.0059389216, 0.03948528, 0.016761888, 0.014929565, 0.02887845, 0.03259471, -0.02611706, 0.031201113, -0.032517288, 0.02411699, -0.03623355, -0.041472446, -0.019949099, 0.01547152, -0.030401085, -0.0022291117, 0.0035452878, -0.03163984, 0.013768233, 0.027949385, 0.018013546, -0.00631958, 0.044749983, -0.0100003565, 0.015381194, -0.046091966, -0.06518942, 0.050117917, -0.019407144, 0.0049614673, -0.064208746, 0.010161653, -0.0058614993, 0.03073658, -0.06044087, -0.0062421584, 0.023613745, -0.008516433, -0.057343982, 0.023239538, 0.0049840487, -0.005516326, 0.01953618, -0.013768233, -0.0011056847, 0.0066905613, -0.031252727, -0.038556214, -0.0451629, 0.018594213, 0.009548727, -0.0075873677, 0.017742569, -0.06415713, -0.03496899, -0.03476253, -0.012839168, -0.0609054, 0.0027113871, -0.051330864, -0.012606901, 0.038633637, 0.033239897, 0.016710274, -0.0077551156, 0.002872683, 0.013135953, 0.0071034795, -0.030297855, 0.035227064, -0.03274
|
|||
|
"**Technical Patterns: Answer Generation Optimisation**
|
|||
|
**How to optimise?**
|
|||
|
When optimising a Retrieval-Augmented Generation (RAG) application, there are several methods to consider. These methods should be tried sequentially from left to right, and multiple approaches can be iterated if necessary.
|
|||
|
. **Prompt Engineering**
|
|||
|
- Experiment with different prompts at each stage of the process to achieve the desired input format or generate relevant output.
|
|||
|
- Guide the model through multiple steps to reach the final outcome.
|
|||
|
. **Few-shot Examples**
|
|||
|
- If the model's behavior is not as expected, provide examples of the desired outcome.
|
|||
|
- Include sample user inputs and the expected processing format to guide the model.
|
|||
|
. **Fine-tuning**
|
|||
|
- If a few examples are insufficient, consider fine-tuning the model with more examples for each process step.
|
|||
|
- Fine-tuning can help achieve a specific input processing or output format.","[0.0051949928, 0.02338401, 0.055535387, 0.0044916403, 0.0052178926, -0.0056399037, 0.022507273, 0.029939907, 0.0088327965, 0.032557033, 0.0348601, -0.05595413, -0.024391603, -0.023619551, -0.014839098, -0.011744347, -0.010239501, -0.0051197503, -0.038314708, 0.034074966, 0.038916644, -0.017587079, 0.006928838, 0.013438935, 0.0072625214, 0.001938308, -0.00061543327, 0.059199363, 0.021041684, -0.019157354, 0.008100001, -0.016514057, -0.019105012, -0.041010346, 0.0075700334, 0.019589178, 0.02350178, 0.011613491, -0.011404121, 0.017443137, 0.008309371, -0.015362523, -0.006758725, 0.054645564, 0.052133124, 0.05014411, 0.013936189, -0.0599845, -0.012346286, 0.030620359, -0.04302553, 0.025883364, 0.028814543, -0.015061553, -0.016762685, -0.0034186193, -0.07490211, -0.04004201, 0.027741523, 0.0064184987, 0.011534978, -0.02829112, 0.014655898, 0.02212779, -0.013949275, -0.0030162362, -0.01970695, 0.00795606, -0.016618742, 0.035147987, 0.02891923, -0.028081749, 0.02568708, -0.025464624, -0.008361714, 0.007556948, 0.04553797, 0.03360388, 0.01635703, -0.037424885, 0.018280616, -0.032007437, 0.0073475777, -0.037660424, -0.025935706, 0.005567933, -0.050353482, -0.013452021, -0.048469152, -0.044962205, -0.060769636, 0.019222781, -0.006454484, 0.05501196, 0.036796775, 0.030698873, 0.007792489, 0.034441363, 0.03357771, 0.045642655, 0.022206303, -0.029416483, -0.01551955, 0.0064839264, 0.046846535, -0.015532635, -0.041036516, 0.016958969, -0.03352537, -0.010115188, -0.060089186, -0.0287622, -0.06448595, -0.0086692255, 0.013661391, -0.029442653, -0.03548821, -0.0031961636, 0.013236108, -0.010566642, -0.036482718, 5.1243507e-05, -0.029678196, -0.032164462, 0.010821811, -0.029416483, 0.0061044437, -0.034284335, 0.033420682, -0.00056799786, 0.048940234, 0.026773186, 0.035723753, -0.009801133, -0.029259454, -0.07380292, -0.009225365, 0.01263417, -0.039806467, 0.022297904, 0.018633928, -0.01701131, -0.06438127, 0.06040324, -0.058204856, -0.034703076, -0.026904043, 0.03148401, -0.038079165, 0.036613576, -0.05783846, -0.02359338, -0.054802593, 0.008132715, 0.025072055, -0.022703558, -0.025229083, 0.016069146, -0.032609373, -0.058885306, -0.005721689, -0.0037686597, -0.02410372, 0.004547254, 0.004946366, -0.005600647, -0.055483047, -0.003138914, -0.035357356, -0.009814218, 0.0032501419, -0.07275607, -0.017809534, 0.005309492, 0.0073933774, -0.0015465572, -0.0516097, -0.04527626, -0.021852992, 0.013504364, -0.035697583, 0.032635547, -0.02673393, 0.0289454, 0.00886551, -0.053546373, -0.02221939, -0.012110745, -0.040879488, -0.01079564, -0.011050809, -0.027113413, 0.047526985, 0.0120976595, 0.008289742, -0.03148401, 0.053860426, -0.019720035, 0.0025304325, -0.0075700334, 0.025137484, -0.009140308, 0.038942818, -0.019262038, 0.003850445, -0.008760825, -0.029442653, 0.0268517, -0.008950567, -0.04619225, 0.004907109, -0.019327467, 0.03629952, 0.067835875, -0.02624976, -0.006532998, -0.027453639, 0.025582395, -0.018267531, -0.0143811, -0.020439744, -0.036953803, 0.011548063, 0.013857676, 0.021120196, 0.056320526, 0.018018903, -0.04511923, 0.025202911, -0.06213054, 0.01363522, -0.0086692255, -0.011816318, -0.026498388, 0.009500163, 0.016343944, 0.009002909, 0.007216722, -0.01016753, -0.013569792, 0.0020184575, 0.01970695, -0.029678196, -0.0044785547, -0.033499196, 0.034127306, -0.042973187, -0.026616158, 0.0516097, 0.0045014545, 0.0080411155, -0.085527636, 0.023645721, -0.041010346, 0.010023588, -0.04072246, -0.023213897, 0.017390793, -0.03501713, -0.026511474, -0.010272215, 0.038210023, -0.004504726, 0.040774804, -0.006568983, 0.024182232, -0.010056302, -0.022598872, -0.02159128, -0.030568017, -0.014852183, -0.0067456393, 0.008407514, 0.019981747, -0.050484337, -0.0065002837, -0.015192409, -0.023606466, -0.015532635, -0.019667692, -0.05663458, -0.027950892, 0.07134282, 0.023606466, 0.00870194, 0.0117836045, 0.026459131, -0.0035854608, -0.020164946, -0.01964152, 0.012693055, -0.0516097, 0.00092580786, -0.029861394, 0.004439298, -0.01593829, -0.005204807, -0.009781504, 0.013
|
|||
|
"Technical Patterns: Answer Generation - Safety Checks
|
|||
|
**Why include safety checks?**
|
|||
|
Safety checks are crucial because providing a model with supposedly relevant context does not guarantee that the generated answer will be truthful or accurate. Depending on the use case, it is important to double-check the information to ensure reliability.
|
|||
|
**RAGAS Score Evaluation Framework**
|
|||
|
The RAGAS score is an evaluation framework that assesses both the generation and retrieval aspects of answer generation:
|
|||
|
- **Generation:**
|
|||
|
- **Faithfulness:** This measures how factually accurate the generated answer is.
|
|||
|
- **Answer Relevancy:** This evaluates how relevant the generated answer is to the question.
|
|||
|
- **Retrieval:**
|
|||
|
- **Context Precision:** This assesses the signal-to-noise ratio of the retrieved context, ensuring that the information is precise.
|
|||
|
- **Context Recall:** This checks if all relevant information required to answer the question is retrieved.
|
|||
|
By using this framework, one can systematically evaluate and improve the quality of generated answers.","[-0.0013862296, 0.035482243, 0.05781903, 0.031999484, -0.019966943, -0.0024533155, -0.027338346, 0.006716749, 0.023541354, 0.040248122, 0.012399145, -0.06179933, -0.012752658, 0.020137154, 0.004310896, -0.021616671, -0.0016325432, -0.023855587, -0.037105784, 0.014873737, 0.012228935, -0.006533446, -0.0046807756, -0.0014296004, -0.02411745, -0.027128858, 0.026997928, 0.017767306, 0.02449715, -0.019155173, 0.018867126, -0.019888386, -0.029590357, -0.024536429, 0.016353255, 0.021498835, 0.02551841, 0.003580957, 0.005332156, -0.0012675736, 0.006085008, 0.01726977, -0.009924553, 0.05451958, 0.017413793, 0.013577522, 0.011332059, -0.07080737, -0.00023894868, 0.010834523, -0.02935468, 0.0130930785, 0.022637932, -0.043154784, -0.0003567864, -0.0132240085, -0.0794488, 0.011665933, 0.018840939, 0.0035744102, -0.005148853, -0.03448717, -0.04414986, 0.021027483, -0.002320748, -0.027993001, -0.020817995, -9.2367576e-05, -0.0057118554, 0.054781437, 0.06075188, 0.0126675535, 0.030506872, -0.00563657, -0.030716361, 0.010003111, 0.07719679, 0.024916127, -0.0025286006, 0.015122505, 0.03448717, -0.0024320392, 0.010847615, -0.051141564, -0.01914208, 0.009708517, -0.057138193, -0.02262484, -0.068555355, -0.047082707, -0.072745144, 0.027469277, 0.0035056716, 0.04530205, 0.031789992, -0.04325953, 0.0029590356, 0.022952165, 0.030847292, -0.004507292, 0.004667682, -0.050303604, -0.0018363042, -0.008196267, 0.057242937, -0.001405051, -0.030192638, 0.0030048615, -0.031423386, -0.033413537, -0.0648893, -0.03773425, -0.060332906, 0.027809698, 0.031920925, -0.0353775, -0.04354758, 0.00045907605, 0.026186157, 0.010644672, -0.020019317, 0.00091897044, 0.015750973, -0.05252943, 0.02407817, -0.027704952, 0.0014598782, 0.00041079533, 0.0067003826, -0.0019214092, -0.0062683113, 0.029276123, 0.04713508, -0.00803915, -0.022480816, -0.00989182, -0.016602023, -0.02636946, -0.037027225, 0.02922375, -0.0049950094, 0.015083226, -0.03024501, 0.06138035, -0.038572207, -0.05158673, 0.0029917683, 0.015803345, -0.030873477, 0.030899664, -0.046611357, -0.029014261, -0.054205343, 0.029040447, 0.008497408, -0.036424942, -0.012248575, 0.018565984, 0.004127593, -0.018880218, -0.021551207, 0.022664119, -0.0232664, 0.007744556, -0.01318473, 0.0139965005, -0.03535131, -0.01893259, -0.043180972, 0.012602088, 0.011495722, -0.029066633, -0.0071946466, 0.0031930744, 0.0016276332, -0.020124061, -0.059233084, -0.018029168, -0.007855847, -0.005620204, -0.05368162, 0.016025927, -0.061013743, 0.005888612, -0.0030506873, -0.035403684, 0.016274696, -0.01982292, -0.033020742, -0.03079492, -0.034565724, 0.014415479, 0.028830959, -0.003310912, 0.0112535, -0.063318126, 0.013106171, 0.003315822, 0.020687064, -0.021682138, 0.014847551, -0.032654136, 0.032549392, -0.019770548, 0.010042391, 0.0027446365, -0.010703592, 0.010232241, -0.03624164, -0.07337361, 0.031920925, -0.02275577, 0.027914442, 0.071959555, -0.020254992, 0.037577134, 0.0067822146, 0.035168007, -0.017806586, 0.0024320392, -0.045485355, 0.014638062, 0.051246308, 0.006363236, -0.0013109444, 0.037917554, 0.05734768, -0.018513612, 0.044883072, -0.042054966, 0.030297382, -0.00648762, -0.033282604, -0.0063828756, 0.012706832, -0.00359405, 0.021472648, 0.0105137415, -0.024772104, 0.031266272, 0.029407054, 0.041059893, -0.019403942, 0.0550433, 0.0074761477, 0.019927666, -0.020660877, -0.016719861, 0.050670214, 0.020870367, 0.01573788, -0.060071044, 0.032392275, -0.04202878, -0.016602023, -0.019128988, -0.00064442493, -0.0118688755, -0.027024113, -0.030271197, -0.017937517, 0.05027742, -0.040300496, -0.020110969, -0.060856625, 0.03079492, 0.02517799, -0.037498575, -0.019639617, -0.039331608, 0.02636946, 0.038310345, 0.009734703, -0.015842624, -0.05451958, -0.014755899, -0.0030539604, 0.018565984, -0.04215971, 0.011233861, -0.037524763, -0.026696786, 0.070755, 0.043914184, 0.015659321, -0.0030850566, -0.011515362, -0.038388904, -0.02820249, -0.026133783, 0.03066399, -0.028857144, 0.027416905, 0.017505445, -0.010160228, -0.035194192, 0
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
gpt-3.5-turbo , gpt-4 , and gpt-4-turbo-preview point to the latest model
|
|||
|
version. You can verify this by looking at the response object after sending a request.
|
|||
|
The response will include the specific model version used (e.g. gpt-3.5-turbo-
|
|||
|
13 ).
|
|||
|
We also offer static model versions that developers can continue using for at least
|
|||
|
three months after an updated model has been introduced. With the new cadence of
|
|||
|
model updates, we are also giving people the ability to contribute evals to help us
|
|||
|
improve the model for different use cases. If you are interested, check out the OpenAI
|
|||
|
Evals repository.
|
|||
|
Learn more about model deprecation on our deprecation page.
|
|||
|
GPT-4 and GPT-4 Turbo
|
|||
|
GPT-4 is a large multimodal model (accepting text or image inputs and outputting text)
|
|||
|
that can solve difficult problems with greater accuracy than any of our previous
|
|||
|
models, thanks to its broader general knowledge and advanced reasoning capabilities.
|
|||
|
GPT-4 is available in the OpenAI API to paying customers. Like gpt-3.5-turbo , GPT-
|
|||
|
is optimized for chat but works well for traditional completions tasks using the Chat
|
|||
|
Completions API. Learn how to use GPT-4 in our text generation guide.
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
CONTEXT
|
|||
|
WIND OW
|
|||
|
TRAINING
|
|||
|
DATA
|
|||
|
gpt-4-0125-preview
|
|||
|
New GPT-4 Turbo
|
|||
|
8,000
|
|||
|
Up to
|
|||
|
Dec
|
|||
|
23
|
|||
|
The latest GPT-4 model
|
|||
|
tokens
|
|||
|
intended to reduce cases of
|
|||
|
“laziness” where the model
|
|||
|
doesn’t complete a task.
|
|||
|
Returns a maximum of
|
|||
|
,096 output tokens.
|
|||
|
Learn more.
|
|||
|
gpt-4-turbo-preview
|
|||
|
Currently points to gpt-4-
|
|||
|
25-preview.
|
|||
|
gpt-4-1106-preview
|
|||
|
GPT-4 Turbo model
|
|||
|
featuring improved
|
|||
|
instruction following, JSON
|
|||
|
mode, reproducible outputs,
|
|||
|
parallel function calling, and
|
|||
|
more. Returns a maximum
|
|||
|
of 4,096 output tokens. This
|
|||
|
8,000
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Dec
|
|||
|
23
|
|||
|
8,000
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Apr 2023
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.040069893, 0.03184975, 0.051276777, -0.032695554, -0.031056812, -0.016413854, -0.015065857, 0.063329466, 0.028122934, 0.02335208, 0.04295091, -0.017748637, -0.024594352, -0.06169072, -0.03208763, -0.014061467, -0.025017252, -0.012515234, -0.038933348, 0.040307775, 0.01591166, -0.021766199, -0.0272507, -0.021898355, 0.024515057, 0.04754996, -0.049373724, -0.009574749, 0.028334385, -0.014180408, 2.3262926e-06, -0.031083243, -0.021805847, -0.008035124, 0.014563662, -0.02645776, 0.008226751, 0.044853967, -0.0017989823, 0.018343342, -0.016440287, -0.025598742, -0.02207016, 0.032933436, -0.002396991, 0.010909531, 0.031559005, -0.017695775, -0.03145328, 0.02386749, -0.026140584, 0.059153315, -0.028598698, 0.035338685, -0.0062377937, -0.0204182, -0.018607656, -0.024012862, 0.011173844, -0.013466762, -0.046334118, -0.025479801, 0.016625306, -0.0021574572, -0.007453635, -0.03499508, -0.028942306, 0.0707831, -0.031056812, 0.0014628088, 0.0013975565, 0.03597304, -0.039911307, -0.025678037, -0.0021508494, 0.014444721, 0.020590005, 0.036660254, 0.019004125, -0.053391285, -0.0010754247, -0.0069778706, -0.03401712, -0.015898444, -0.017220011, 0.00999765, -0.008966829, -0.012026255, -0.024686862, -0.023193492, -0.05093317, -0.027197838, -0.023286, 0.015475543, 0.044457495, -0.042871617, 0.0013909487, -0.010156238, -0.0019873055, 0.0373739, 0.0025324516, 0.0066078324, -0.008339084, 0.02456792, 0.019189145, 0.013374252, 0.0037664643, -0.023087766, -0.048501488, 0.013433723, -0.0743249, -0.028149365, -0.021858709, 0.013301566, -0.040069893, -0.009198102, -0.0053688637, 0.0012670518, 0.020233182, -0.042554438, -0.036660254, 0.027382856, 0.037321035, -0.036131628, 0.009931572, 0.024065726, 0.0007822021, -0.045435455, 0.0312154, -0.0035913568, -0.033144888, 0.0068324986, 0.026180232, -0.047206353, -0.03184975, -0.033884965, -0.04580549, 0.021713337, -0.048157882, 0.017656127, 0.01246898, -0.0029586568, -0.03597304, 0.042395853, -0.089655064, -0.032748416, -0.013037253, 0.012990998, -0.08019265, 0.050008073, -0.024924742, 0.03977915, 0.020814672, 0.0016874751, -0.015488759, -0.024805803, 0.007612223, 0.06803424, -0.0003626048, -0.0764394, -0.003429465, -0.0050285603, -0.023576746, -0.0110747265, 0.019493105, 0.04678345, -0.003858974, 0.012198058, -0.09991042, -0.07717948, 0.03578802, 0.012145195, -0.048078585, 0.003508759, 0.0060362546, 0.0133676445, -0.05410493, -0.010182669, -0.033884965, -0.05952335, -0.012475587, 0.008140849, -0.011728902, -0.0072025373, -0.04910941, -0.0080153, 0.0049393545, -0.010823629, -0.003822631, 0.045488317, 0.011933745, -0.006145284, 0.051144622, 0.022149453, -0.024435764, -0.027620738, 0.020127457, -0.010684865, 0.039091934, 0.035259392, 0.020457849, 0.02429039, -0.02447541, -0.0545014, 0.03502151, -0.031744026, 0.0121121565, 0.0009911748, -0.04688918, 0.016744247, 0.033673514, -0.0086826915, -0.003541798, -0.019096635, -0.034519315, -0.028360816, -0.060950644, -0.014827975, 0.034334294, 0.04001703, -0.020695731, 0.030951086, 0.01441829, 0.034625042, -0.022334473, 0.03481006, 0.030131714, 0.00574551, 0.011444765, -0.0145504465, -0.0037268174, -0.0012711817, -0.01759005, -0.030131714, -0.013638565, -0.025017252, 0.058148924, -0.010321434, -0.010684865, -0.09478275, -0.028598698, 0.019228792, 0.009621004, 0.013149586, 0.026233094, 0.029603088, -0.009039515, -0.09261537, 0.031585436, 0.014590094, 0.044378202, -0.04987592, -0.002368908, -0.001144807, 0.04178793, -0.014854407, -0.0061915386, 0.038721897, -0.04292448, -0.03536512, 0.03599947, 0.026933525, -0.019717772, -0.007731164, -0.01563413, 0.035708725, 0.021990865, -0.012673822, -0.014973348, -0.037426762, 0.056351595, -0.030290302, 0.00037003862, 0.0074932817, -0.05571724, 0.019440243, -0.010678257, 0.0071100276, -0.024951175, -0.02389392, -0.01752397, -0.027911482, 0.035920177, 0.025717683, -0.0002756705, 0.007684909, 0.023404941, 0.018356558, 0.01243594, -0.008424986, 0.055611517, -0.019043772, 0.007784026, -0.03140042, 0.054977164, 0.008643044, 0.050272387, -0.0017147325, 0.027700033, -0.033144888, 0.017814716, -0.042342987, -0.027303563, -0.0421579
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
is a preview model.
|
|||
|
Learn more.
|
|||
|
CONTEXT
|
|||
|
WIND OW
|
|||
|
TRAINING
|
|||
|
DATA
|
|||
|
gpt-4-vision-preview
|
|||
|
GPT-4 with the ability to
|
|||
|
understand images, in
|
|||
|
8,000
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Apr 2023
|
|||
|
addition to all other GPT-4
|
|||
|
Turbo capabilities. Currently
|
|||
|
points to gpt-4-1106-
|
|||
|
vision-preview.
|
|||
|
gpt-4-1106-vision-preview GPT-4 with the ability to
|
|||
|
understand images, in
|
|||
|
addition to all other GPT-4
|
|||
|
Turbo capabilities. Returns a
|
|||
|
maximum of 4,096 output
|
|||
|
tokens. This is a preview
|
|||
|
model version. Learn more.
|
|||
|
8,000
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Apr 2023
|
|||
|
gpt-4
|
|||
|
gpt-4-0613
|
|||
|
Currently points to gpt-4-
|
|||
|
,192
|
|||
|
Up to
|
|||
|
13. See
|
|||
|
tokens
|
|||
|
Sep 2021
|
|||
|
continuous model upgrades.
|
|||
|
Snapshot of gpt-4 from
|
|||
|
June 13th 2023 with
|
|||
|
improved function calling
|
|||
|
support.
|
|||
|
,192
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Sep 2021
|
|||
|
gpt-4-32k
|
|||
|
Currently points to gpt-4-
|
|||
|
gpt-4-32k-0613
|
|||
|
k-0613. See
|
|||
|
continuous model upgrades.
|
|||
|
This model was never rolled
|
|||
|
out widely in favor of GPT-4
|
|||
|
Turbo.
|
|||
|
Snapshot of gpt-4-32k
|
|||
|
from June 13th 2023 with
|
|||
|
improved function calling
|
|||
|
support. This model was
|
|||
|
never rolled out widely in
|
|||
|
favor of GPT-4 Turbo.
|
|||
|
,768
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Sep 2021
|
|||
|
,768
|
|||
|
tokens
|
|||
|
Up to
|
|||
|
Sep 2021
|
|||
|
For many basic tasks, the difference between GPT-4 and GPT-3.5 models is not
|
|||
|
significant. However, in more complex reasoning situations, GPT-4 is much more
|
|||
|
capable than any of our previous models.
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.024550244, 0.019979006, 0.033665832, -0.02118904, -0.035924565, -0.025141817, 0.011139035, 0.05969501, -0.009559268, 0.010110506, 0.026392184, -0.038801756, -0.027104761, -0.055177547, -0.026069509, -0.01840596, -0.03156844, -0.01706148, -0.021350376, 0.049476944, 0.024415797, -0.029551718, 0.00012478475, -0.0051123933, 0.025679609, 0.027239209, -0.024657803, -0.005804802, 0.01835218, -0.013680106, 0.017800944, -0.043426774, -0.0070921434, -0.014143952, 0.002813329, -0.014843083, 0.006184618, 0.016940475, -0.028099677, 0.035897672, -0.008739134, -0.038774867, -0.021256262, 0.059210993, 0.010923917, 0.02640563, 0.018970644, -0.01952188, -0.020261345, 0.03689259, -0.046949316, 0.047809787, -0.023985563, 0.07093488, -0.0008781149, -0.02077225, -0.01706148, -0.016685024, -0.0071257553, -0.008577797, -0.018459741, -0.014816194, 0.016335458, 0.011461711, -0.03103065, -0.024644358, -0.01968322, 0.06840725, -0.024093121, -0.007999669, 0.012859972, 0.045766175, -0.012759136, -0.02295031, -0.005710688, 0.026916534, 0.02339399, 0.046895538, 0.0026872838, -0.035117876, -0.0013150716, 0.020987367, -0.016483352, -0.03248269, -0.0012016309, -0.010843249, -0.017424488, -0.00883997, -0.02952483, -0.027373657, -0.050229855, -0.040280685, -0.0253166, 0.009942446, 0.025800614, -0.032213792, 0.0085979635, -0.013821277, 0.008228231, 0.03694637, -0.014022949, 0.008046726, -0.01731693, 0.027454326, 0.007690438, 0.0033897758, 0.008766023, -0.019306764, -0.03382717, 0.033101153, -0.114012085, -0.023972116, -0.032886036, 0.0018352182, -0.041383162, -0.022963755, -0.027306434, -0.029067704, 0.022331849, -0.037322827, -0.029202152, 0.0066182134, 0.009686994, -0.045013264, 0.00920298, 0.0034956536, 0.022869641, -0.030492855, 0.017895058, -0.0054182634, -0.03624724, 0.023259541, 0.025249375, -0.04684176, -0.035306104, -0.06749301, -0.049530722, 0.028072787, -0.04444858, 0.005267009, 0.01848663, -0.0052434807, -0.0006348477, 0.045766175, -0.06297555, -0.01435907, -0.018419405, 0.018768972, -0.08104538, 0.047379553, -0.030465966, 0.03159533, 0.038156405, -0.025356933, -0.009290372, -0.018258069, 0.0017167357, 0.05727494, -0.0103928475, -0.04512082, -0.01068191, 0.006147645, -0.010977697, 0.0024889726, 0.004419985, 0.038237073, -0.024765361, 0.019589106, -0.10476205, -0.08991897, 0.034176737, 0.03103065, -0.02713165, -0.019226095, 0.010460071, 0.0001648041, -0.02222429, -0.028126568, -0.019642884, -0.06329822, -0.02489981, 0.012617965, -0.0008209744, 0.002178061, -0.020234456, -0.029040815, 0.0014369154, 0.011616326, 0.0030351684, 0.038747977, 0.028072787, 0.010359235, 0.071257554, 0.033612054, -0.0034301102, -0.037887506, 0.008013113, -0.003396498, 0.039635334, 0.0173976, 0.0014621244, 0.022869641, -0.012907029, -0.04296965, 0.029229043, -0.014049838, 0.033504497, -0.006171173, -0.058350526, 0.00334608, 0.038183294, -0.014143952, 0.009747496, -0.019710109, -0.042028513, -0.011475155, -0.046250187, -0.031165097, 0.03683881, 0.0347952, -0.037537944, 0.026540078, 0.027642554, 0.046357743, -0.028045898, 0.035951454, 0.018526964, -0.00069198816, 0.0009789511, -0.023125093, -0.01282636, -0.01962944, -0.027440881, -0.04132938, -0.020987367, -0.008261843, 0.037457272, -0.012604521, -0.0018268152, -0.078625314, -0.024550244, 0.035171654, 0.0097878305, 0.013727163, 0.033450715, 0.031487774, -0.00825512, -0.07523722, 0.023272986, 0.024267903, 0.054101963, -0.037215266, -0.00094870024, 0.0027309794, 0.010977697, -0.004208229, -0.028610582, 0.050848316, -0.034203626, -0.028314795, 0.0032906202, 0.013767498, -0.015138869, -0.020234456, -0.02690309, 0.0037107707, 0.011555824, 0.015649773, -0.0047191326, -0.053187713, 0.06663254, -0.00872569, 0.0034418744, 0.014453183, -0.05055253, 0.01729004, -0.008046726, 0.0050855037, -0.014923752, -0.008786191, 0.009525656, -0.023716666, 0.044717476, 0.043883897, -0.020422684, 0.013706996, 0.019589106, 0.00546532, -3.4452354e-05, -0.017478269, 0.058027852, -0.04988029, 0.024079675, -0.04157139, 0.04235119, 0.032590248, 0.0589421, 0.0049443333, 0.027185429, -0.01729004, 0.053214606, -0.029013926, -0.020032784, -0.00465190
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
Multilingual capabilities
|
|||
|
GPT-4 outperforms both previous large language models and as of 2023, most state-
|
|||
|
of-the-art systems (which often have benchmark-specific training or hand-
|
|||
|
engineering). On the MMLU benchmark, an English-language suite of multiple-choice
|
|||
|
questions covering 57 subjects, GPT-4 not only outperforms existing models by a
|
|||
|
considerable margin in English, but also demonstrates strong performance in other
|
|||
|
languages.
|
|||
|
GPT-3.5 Turbo
|
|||
|
GPT-3.5 Turbo models can understand and generate natural language or code and
|
|||
|
have been optimized for chat using the Chat Completions API but work well for non-
|
|||
|
chat tasks as well.
|
|||
|
CONTEXT
|
|||
|
WIND OW
|
|||
|
TRAINING
|
|||
|
DATA
|
|||
|
,385
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
gpt-3.5-turbo-0125
|
|||
|
New Updated GPT 3.5 Turbo
|
|||
|
The latest GPT-3.5 Turbo
|
|||
|
model with higher accuracy at
|
|||
|
responding in requested
|
|||
|
formats and a fix for a bug
|
|||
|
which caused a text encoding
|
|||
|
issue for non-English
|
|||
|
language function calls.
|
|||
|
Returns a maximum of 4,096
|
|||
|
output tokens. Learn more.
|
|||
|
gpt-3.5-turbo
|
|||
|
Currently points to gpt-3.5-
|
|||
|
,096
|
|||
|
Up to Sep
|
|||
|
turbo-0613. The gpt-3.5-
|
|||
|
tokens
|
|||
|
21
|
|||
|
turbo model alias will be
|
|||
|
automatically upgraded from
|
|||
|
gpt-3.5-turbo-0613 to
|
|||
|
gpt-3.5-turbo-0125 on
|
|||
|
February 16th.
|
|||
|
gpt-3.5-turbo-1106
|
|||
|
GPT-3.5 Turbo model with
|
|||
|
improved instruction
|
|||
|
,385
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
following, JSON mode,
|
|||
|
reproducible outputs, parallel
|
|||
|
function calling, and more.
|
|||
|
Returns a maximum of 4,096
|
|||
|
output tokens. Learn more.
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.04676215, 0.029405141, 0.07322403, -0.03672204, -0.02039655, -0.03325614, -0.005181659, 0.05748994, 0.0071656117, 0.018140964, 0.039390236, -0.031908292, -0.049265303, -0.036034364, -0.019062454, -0.017632082, -0.034796543, -0.015912885, -0.027754711, 0.023944972, 0.041260723, -0.015692828, -0.032816026, -0.014716324, 0.020424057, 0.022885947, -0.041205708, 0.0016280793, 0.0032561587, -0.010377072, 0.0071862424, -0.035539236, -0.022830933, 0.0021404, 0.01731575, -0.0056252116, 0.014234949, 0.027397119, 0.008761027, 0.01997019, -0.032238375, -0.04164582, -0.015266467, 0.028524913, -0.006213177, 0.02666818, 0.021854429, 0.003357591, -0.037932355, 0.021345546, -0.028992534, 0.057159852, -0.036694534, 0.036997113, -0.015252713, -0.019681364, -0.021194257, -0.016683085, 0.014675063, -0.026626918, -0.026585659, -0.02505901, 0.014248703, 0.0041914014, -0.018622339, -0.023656147, -0.012701426, 0.046789657, -0.017439531, -0.010493977, 0.0070624603, 0.016806867, -0.036777057, -0.045111723, -0.019447554, 0.014510021, -0.0062028617, 0.042361006, -0.009985095, -0.04811, -0.015183945, -0.013224062, -0.02835987, -0.044534072, 0.008417187, 0.024880216, -0.024096262, -0.003120342, -0.032155856, -0.044891667, -0.045744386, -0.046514586, -0.033806283, -0.002456732, 0.044424042, -0.047614872, 0.032265883, -0.00085744937, -0.012281941, 0.04071058, -0.0013469906, -0.006089395, 0.010480223, 0.020410303, 0.006481372, 0.0033730639, 0.02228079, -0.04076559, -0.024715172, 0.006543263, -0.110743776, -0.009799422, -0.009730654, 0.0011742114, -0.025182793, -0.019488813, 0.015582799, -0.018608585, 0.020025203, -0.044314016, -0.019158728, 0.014372485, 0.026461875, -0.05091573, 0.017522054, 0.028717462, 0.008238391, -0.031110585, 0.012233804, 0.013698559, -0.028662447, 0.005738679, 0.029845254, -0.043433785, -0.026764454, -0.028249841, -0.043351263, 0.011663031, -0.04667963, 0.018649846, 0.02544411, -0.024467608, -0.041123185, 0.056664724, -0.088462986, -0.034191385, -0.029350126, 0.009503719, -0.06953807, 0.040655565, -0.028098552, 0.030890526, -0.008204007, 0.016834375, -0.012529505, -0.042113442, -0.0077982764, 0.07867044, 0.017150706, -0.07845038, -0.0027679068, 0.021909444, -0.026406862, -0.009661886, 0.029322619, 0.063211426, -0.011656154, 0.011305437, -0.08791284, -0.0788905, 0.04137075, -0.0009876785, -0.05919538, -0.007818907, -0.021290531, -0.0068561565, -0.04802748, -0.01851231, -0.050970744, -0.042773616, -0.0075919726, 0.032816026, -0.011518618, -0.012481368, -0.03105557, -0.021524344, 0.000105945495, 0.0029879638, -0.0031358148, 0.057709996, 0.016641824, 0.011422343, 0.07091343, 0.03586932, -0.015527785, -0.04667963, 0.046624616, -0.023559872, 0.025114026, 0.02412377, 0.024302565, 0.026118036, -0.03490657, -0.07894551, 0.023807436, -0.050283067, 0.004122634, 0.013980508, -0.052621175, 0.0060584494, 0.054656703, 0.006426357, 0.005965613, -0.0071724886, -0.040435508, -0.02043781, -0.06123091, -0.0028469898, 0.054216586, 0.02197821, -0.020946693, 0.035044108, 0.021400562, 0.020836664, -0.031550698, 0.023917465, 0.022830933, 0.0089467, 0.022610875, -0.025334083, 0.002463609, -0.028524913, -0.02116675, -0.030257862, -0.015115177, -0.029927777, 0.05286874, 0.0012842399, -0.025815457, -0.062441226, -0.029350126, 0.017425777, 0.021881936, 0.004518049, 0.033778775, 0.025457865, -0.017810877, -0.09456957, 0.049265303, -0.0049787937, 0.026970759, -0.039912872, 0.006302575, 0.011993117, 0.02005271, 0.0082108835, -0.019846408, 0.03875757, -0.01605042, -0.032623477, -0.0073856693, 0.016793113, -0.028249841, -0.0082108835, -0.0020561593, -0.0051954123, 0.003450428, 0.033393677, -0.014331223, -0.03999539, 0.048440088, -0.04090313, 0.004875642, 0.013354721, -0.06557704, -0.00012861741, 0.005752432, 0.0006262174, -0.01919999, -0.0011114607, -0.026846975, -0.0205891, 0.05198851, 0.04029797, -0.012302572, -0.004449281, 0.016022913, 0.022198267, -0.0016229217, -0.026186805, 0.057820026, -0.022555862, 0.010308304, -0.02505901, 0.04398393, 0.0028710584, 0.052043524, 0.016600564, 0.013787958, -0.019158728, 0.041040663, -0.033283647, -0.025471618, -0.02
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
gpt-3.5-turbo-instruct Similar capabilities as GPT-3
|
|||
|
era models. Compatible with
|
|||
|
legacy Completions endpoint
|
|||
|
and not Chat Completions.
|
|||
|
CONTEXT
|
|||
|
WIND OW
|
|||
|
TRAINING
|
|||
|
DATA
|
|||
|
,096
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
gpt-3.5-turbo-16k
|
|||
|
Legacy Currently points to
|
|||
|
gpt-3.5-turbo-16k-0613.
|
|||
|
,385
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
gpt-3.5-turbo-0613
|
|||
|
Legacy Snapshot of gpt-3.5-
|
|||
|
turbo from June 13th 2023.
|
|||
|
Will be deprecated on June 13,
|
|||
|
24.
|
|||
|
,096
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
gpt-3.5-turbo-16k-0613
|
|||
|
Legacy Snapshot of gpt-3.5-
|
|||
|
,385
|
|||
|
Up to Sep
|
|||
|
k-turbo from June 13th
|
|||
|
tokens
|
|||
|
21
|
|||
|
23. Will be deprecated on
|
|||
|
June 13, 2024.
|
|||
|
DALL·E
|
|||
|
DALL·E is a AI system that can create realistic images and art from a description in
|
|||
|
natural language. DALL·E 3 currently supports the ability, given a prompt, to create a
|
|||
|
new image with a specific size. DALL·E 2 also support the ability to edit an existing
|
|||
|
image, or create variations of a user provided image.
|
|||
|
DALL·E 3 is available through our Images API along with DALL·E 2. You can try DALL·E 3
|
|||
|
through ChatGPT Plus.
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
dall-e-3
|
|||
|
New DALL·E 3
|
|||
|
The latest DALL·E model released in Nov 2023. Learn more.
|
|||
|
dall-e-2 The previous DALL·E model released in Nov 2022. The 2nd iteration of
|
|||
|
DALL·E with more realistic, accurate, and 4x greater resolution images
|
|||
|
than the original model.
|
|||
|
TTS
|
|||
|
TTS is an AI model that converts text to natural sounding spoken text. We offer two
|
|||
|
different model variates, tts-1 is optimized for real time text to speech use cases
|
|||
|
and tts-1-hd is optimized for quality. These models can be used with the Speech
|
|||
|
endpoint in the Audio API.
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.0026249585, 0.009264163, 0.03943346, -0.03316732, -0.029845187, -0.0123972315, -0.012775361, 0.044133063, -0.024510866, -0.01107378, 0.014260868, -0.049318835, -0.04359288, -0.07303293, -0.04910276, 0.048616596, -0.0028038947, -0.028089589, -0.00305373, 0.05093939, 0.024065215, 0.00077693706, -0.043025687, -0.00239538, 0.04840052, 0.016664688, -0.0051958985, 0.037245713, 0.011884057, -0.04875164, 0.0022518937, -0.060284577, -0.005584156, -0.027846506, 0.028521735, 0.03187088, 0.017704543, 0.055855066, -0.01901449, 0.0050608525, -0.02282279, -0.035111986, 0.0023768113, 0.048967715, 0.0017133973, -0.0037509054, 0.0012103507, -0.019811263, -0.016435111, 0.0006697442, -0.028251644, 0.049561918, -0.021553358, 0.06536231, -0.042620547, -0.009885374, -0.03943346, -0.0008085885, 0.014720025, -0.04289064, -0.04216139, -0.0013361124, 0.009898879, 0.015476283, -0.022768771, -0.034193672, -0.034463763, 0.044565212, -0.039190378, 0.0055672755, -0.017974636, 0.027117256, -0.06876548, -0.04083794, 0.0050135865, 0.016313568, 0.00047055125, 0.04640184, 0.01661067, -0.029575095, -0.039568506, 0.010297265, -0.041837282, -0.0058812574, -0.009108859, 0.0020240033, -0.020094858, -0.013808464, -0.023673581, -0.02645553, -0.06752305, -0.031735834, -0.011877304, 0.0071641956, 0.067955196, -0.015800394, 0.043754935, -0.023970682, -0.0021421688, 0.03775889, -0.0058745053, 0.005374835, 0.011823286, 0.014193345, 0.020540511, -0.017691039, 0.0015420576, -0.037110668, 0.0009191575, -0.0065868734, -0.12705137, -0.003723896, -0.013659913, -0.018595848, -0.012289195, -0.027927533, 0.0063640475, -0.006310029, -0.0054322295, -0.0495079, -0.050966397, 0.011377634, 0.027819496, -0.024267783, 0.025793804, -0.008852271, -0.013909748, -0.03178985, -0.01881192, -0.0088657765, -0.019257573, 0.022431158, 0.023673581, -0.048319492, -0.015975954, -0.040297754, -0.031924896, -0.018501315, -0.027900524, 0.040702894, 0.010493082, -0.039217386, -0.022080038, 0.062391296, -0.079785235, -0.02873781, -0.02613142, 0.0018349389, -0.023835637, 0.021512844, -0.054639652, 0.01731291, -0.008082509, -0.0010702403, -0.035868242, -0.029629113, -0.012309452, 0.042026345, 7.4908385e-05, -0.047482207, -0.023795122, 0.0025996375, -0.012599801, -0.01356538, -0.015921935, 0.02941304, 0.0072519756, 0.03873122, -0.1060382, -0.050291166, 0.010060934, 0.01968972, -0.039190378, -0.022890314, -0.0052667977, -0.049615934, -0.028116597, -0.029926214, -0.037866924, -0.05844795, -0.011222331, 0.03324835, -0.022687744, -0.019000987, -0.01245125, -0.027738469, -0.004716485, 0.017610012, -0.007657114, 0.053073116, 0.005496376, 0.0047232374, 0.06395783, 0.041702233, 0.01031077, -0.022606717, 0.028845847, -0.00492243, 0.06163504, 0.025307639, 0.048184447, 0.011310111, -0.032762185, -0.07233069, 0.016651183, -0.03494993, 0.019730235, 0.010553853, -0.05164163, -0.030952565, 0.051668637, -0.011789524, -0.011634221, -0.02176943, -0.06692885, -2.0916319e-05, -0.07027799, -0.028683791, 0.031978916, 0.02838669, -0.027792487, 0.06320158, 0.0072182138, 0.02973715, -0.024645913, -0.009925888, 0.02214756, -0.012701086, 0.004277585, -0.004787384, -0.0111007895, -0.011364129, -0.017339919, -0.02944005, -0.00084741425, -0.020432474, 0.03351844, -0.024645913, -0.004102025, -0.02442984, -0.03246508, -0.004456521, 0.0034706846, 0.024794463, 0.039190378, 0.035220023, 0.014085308, -0.0864295, 0.048967715, 0.011573451, 0.041648217, -0.006421442, 0.022687744, -0.020108365, 0.03324835, 0.001219635, -0.052803025, 0.041675225, -0.036516465, -0.013146738, 0.012106882, 0.032032933, 0.0030284086, 0.028359681, -0.0058643767, -0.002525362, 0.026550062, 0.007893444, -0.0010643321, -0.010141962, 0.030898547, -0.02229611, 0.007035902, 0.01227569, -0.046969034, 0.0093316855, 0.006684782, -0.002987895, 0.015435769, 0.008859024, -0.02455138, -0.012883398, 0.01039855, 0.022485176, -0.033356387, 0.00033698222, 0.0010761486, -0.013578885, -0.028602764, -0.021013172, 0.03700263, -0.04081093, 0.008933299, -0.032249007, 0.025240116, 0.022161065, 0.042053353, -5.8555142e-05, -0.008150032, -0.006907608, 0.043052696, 0.0001371562, -0.
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
tts-1
|
|||
|
New Text-to-speech 1
|
|||
|
The latest text to speech model, optimized for speed.
|
|||
|
tts-1-hd
|
|||
|
New Text-to-speech 1 HD
|
|||
|
The latest text to speech model, optimized for quality.
|
|||
|
Whisper
|
|||
|
Whisper is a general-purpose speech recognition model. It is trained on a large dataset
|
|||
|
of diverse audio and is also a multi-task model that can perform multilingual speech
|
|||
|
recognition as well as speech translation and language identification. The Whisper v2-
|
|||
|
large model is currently available through our API with the whisper-1 model name.
|
|||
|
Currently, there is no difference between the open source version of Whisper and the
|
|||
|
version available through our API. However, through our API, we offer an optimized
|
|||
|
inference process which makes running Whisper through our API much faster than
|
|||
|
doing it through other means. For more technical details on Whisper, you can read the
|
|||
|
paper.
|
|||
|
Embeddings
|
|||
|
Embeddings are a numerical representation of text that can be used to measure the
|
|||
|
relatedness between two pieces of text. Embeddings are useful for search, clustering,
|
|||
|
recommendations, anomaly detection, and classification tasks. You can read more
|
|||
|
about our latest embedding models in the announcement blog post.
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
text-embedding-
|
|||
|
-large
|
|||
|
New Embedding V3 large
|
|||
|
Most capable embedding model for both
|
|||
|
english and non-english tasks
|
|||
|
text-embedding-
|
|||
|
New Embedding V3 small
|
|||
|
-small
|
|||
|
Increased performance over 2nd generation ada
|
|||
|
embedding model
|
|||
|
text-embedding-
|
|||
|
ada-002
|
|||
|
Most capable 2nd generation embedding
|
|||
|
model, replacing 16 first generation models
|
|||
|
OUTP UT
|
|||
|
DIMENSION
|
|||
|
,072
|
|||
|
,536
|
|||
|
,536
|
|||
|
Moderation
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[0.022095108, -0.004835739, 0.021718634, -0.019550666, -0.03390859, 0.012884486, 0.0043294467, 0.010288116, -0.032532517, -0.0083992565, 0.026145445, -0.033181608, -0.072127156, -0.019407865, 0.01080739, 0.011255263, 0.0036673725, -0.018564045, -0.016448004, 0.03403841, 0.0132025415, 0.005611405, -0.05852218, 0.024925152, 0.030169819, -0.008457676, -0.033155642, 0.028170614, 0.02183547, -0.014968073, -0.00072820066, -0.045488402, -0.02645701, -0.018628955, -0.010820372, 0.02027765, -0.019096302, 0.0007269836, -0.008016292, 0.03201324, -0.0031464759, -0.04400847, -0.028508142, 0.051589873, -0.017434625, 0.028508142, -0.01431898, -0.031000657, -0.054783408, 0.027547484, -0.029053379, 0.032454625, -0.04216505, 0.035102922, 0.006490925, 0.0035602723, 0.00033286275, 0.0049785394, 0.0017363224, -0.011086499, -0.022432636, 0.010372498, -0.020796923, 0.0023983968, -0.01326745, -0.02351013, -0.01888859, 0.037725255, -0.045929786, -0.03634918, 0.024224132, 0.01627924, -0.054731477, -0.00089980447, -0.00094037276, -0.009054841, -0.04078897, 0.09372895, 0.009236586, -0.021030597, -0.043125704, 0.0152017465, -0.04863001, 0.00078012806, -0.01572102, -0.00051765126, -0.036478996, 0.004744866, -0.03629725, -0.03577798, -0.055562317, -0.039698496, -0.033103716, -0.012469066, 0.029598618, -0.030922767, 0.020303613, -0.019615576, 0.02806676, 0.04302185, 0.018719828, -0.023211548, -0.025119878, 0.02182249, 0.000106897416, -0.024808316, 0.023289438, -0.033181608, -0.025158824, 0.019239102, -0.103179745, -0.016746586, -0.020719033, -0.02077096, -0.0010271888, -0.059612654, 0.0043034833, -0.0020397732, -0.025093915, -0.025457408, -0.017162004, 0.023549076, 0.046500985, 0.003339581, 0.012644322, -0.0017314542, -0.019706449, -0.021043578, -0.046786588, -0.009924624, -0.0032698035, 0.026612792, 0.052965946, -0.026898393, -0.03993217, -0.04237276, -0.025379516, 0.032065168, -0.004008146, -0.000704671, 0.025301626, -0.057639413, -0.023419257, 0.017395679, -0.048084773, -0.025937736, -0.035050996, -0.026664719, -0.0527842, 0.025288643, -0.035907798, -0.0009906774, 0.0014523445, 0.0059619145, -0.04016584, -0.04050337, -0.007516491, 0.03679056, 0.0010336798, -0.045332618, -0.0065039066, 0.023172602, -0.012202939, 0.013222014, 0.022861037, 0.043203596, 0.0051700217, -0.0046150475, -0.073321484, -0.09658496, 0.027313812, 0.006770035, -0.021770561, -0.027547484, -0.0015716152, -0.05789905, -0.026495956, -0.03837435, -0.015461383, -0.050447468, -0.015759965, 0.046760622, -0.039906207, 0.011456482, -0.017006224, -0.021394089, 0.0047740755, 0.058002904, -0.0031773078, 0.027417667, -0.018031789, 0.015941711, 0.05769134, 0.047903027, 0.023380311, -0.002167969, -0.011365609, -0.0021274006, 0.038919587, -0.004481984, 0.05665279, 0.026794538, -0.008301893, -0.03938693, 0.0070621264, -0.025132861, -0.008016292, 0.02358802, -0.022497546, 0.020251686, 0.053589076, 0.017655315, 0.045436475, -0.039620604, -0.06428612, 0.020056957, -0.078825794, -0.008756258, 0.005059676, 0.048578084, -0.02021274, 0.06257252, 0.03128626, 0.041957337, -0.008821167, 0.025717044, -0.01740866, -0.012261357, 0.00751, -0.023873622, 0.023795731, -0.0047124117, -0.03650496, -0.0039140275, 0.011547355, -0.013708834, 0.05257649, -0.006795998, 0.006091733, -0.067661405, -0.03289601, -0.020822886, 0.0047967937, 0.037725255, 0.044813346, 0.023380311, -0.0019959593, -0.09211921, 0.028949525, 0.020485358, 0.04554033, -0.006802489, 0.03377877, -0.0056049135, 0.026664719, -0.02280911, -0.042346794, 0.05200529, -0.033363353, 0.017733207, -0.010606172, 0.031961314, -0.019070337, 0.0066142525, 0.009723405, -0.040659152, 0.011982247, 0.017811097, 0.011287718, -0.015734002, -0.0059262146, -0.025223734, 0.010813881, -0.00039696062, -0.043826725, 0.02408133, -0.026275264, -0.027287848, -0.0132025415, -0.0011724234, 0.027235921, -0.017369715, 0.011092991, 0.046786588, 0.003466154, -0.016655713, -0.0013411874, -0.0096520055, -0.03416823, -0.00012616735, 0.033674918, -0.008749766, 0.026638756, -0.048889644, -0.020225722, 0.008126638, 0.067038275, 0.019810302, 0.0416977, -0.0332595, 0.07565822, -0.0203295
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
The Moderation models are designed to check whether content complies with
|
|||
|
OpenAI's usage policies. The models provide classification capabilities that look for
|
|||
|
content in the following categories: hate, hate/threatening, self-harm, sexual,
|
|||
|
sexual/minors, violence, and violence/graphic. You can find out more in our moderation
|
|||
|
guide.
|
|||
|
Moderation models take in an arbitrary sized input that is automatically broken up into
|
|||
|
chunks of 4,096 tokens. In cases where the input is more than 32,768 tokens,
|
|||
|
truncation is used which in a rare condition may omit a small number of tokens from
|
|||
|
the moderation check.
|
|||
|
The final results from each request to the moderation endpoint shows the maximum
|
|||
|
value on a per category basis. For example, if one chunk of 4K tokens had a category
|
|||
|
score of 0.9901 and the other had a score of 0.1901, the results would show 0.9901 in the
|
|||
|
API response since it is higher.
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
MAX
|
|||
|
TOKENS
|
|||
|
text-moderation-latest Currently points to text-moderation-
|
|||
|
,768
|
|||
|
7.
|
|||
|
text-moderation-stable Currently points to text-moderation-
|
|||
|
,768
|
|||
|
7.
|
|||
|
text-moderation-007
|
|||
|
Most capable moderation model across
|
|||
|
all categories.
|
|||
|
,768
|
|||
|
GPT base
|
|||
|
GPT base models can understand and generate natural language or code but are not
|
|||
|
trained with instruction following. These models are made to be replacements for our
|
|||
|
original GPT-3 base models and use the legacy Completions API. Most customers
|
|||
|
should use GPT-3.5 or GPT-4.
|
|||
|
MODEL
|
|||
|
DE S CRIPTION
|
|||
|
babbage-002 Replacement for the GPT-3 ada and
|
|||
|
babbage base models.
|
|||
|
davinci-002 Replacement for the GPT-3 curie and
|
|||
|
davinci base models.
|
|||
|
MAX
|
|||
|
TOKENS
|
|||
|
TRAINING
|
|||
|
DATA
|
|||
|
,384
|
|||
|
tokens
|
|||
|
,384
|
|||
|
tokens
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
Up to Sep
|
|||
|
21
|
|||
|
How we use your data
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[0.013017903, 0.048166927, 0.049313758, -0.034377642, -0.030391036, -0.0019881828, -0.020779496, 0.027769707, 0.0057341577, 0.011324962, 0.02540778, -0.04136785, -0.072031945, -0.027633179, -0.013611798, -0.017325347, 0.0125195775, 0.010430706, -0.01961901, 0.05854302, 0.021038897, 0.022049202, -0.0047443327, 0.012662931, 0.028861927, 0.01087442, -0.042077795, -0.0016844089, 0.0012577602, -0.03754508, 0.036015972, -0.027906235, -0.029872231, 0.013058862, 0.0072564404, -0.0068127257, -0.013304612, 0.036616694, 0.018444873, 0.022718187, -0.024342865, -0.025667183, -0.025721794, 0.021530397, -0.013700541, 0.011379573, 0.01372102, -0.014594797, -0.037026275, 0.01941422, -0.0554575, 0.04349768, -0.008253091, 0.038773827, 0.032329727, 0.022895673, -0.018048944, -0.0028721986, -0.014963421, -0.026691139, -0.044999488, -0.015523184, 0.0053655333, -0.036097888, -0.022021897, -0.035087585, -0.038255025, 0.036644, -0.024929933, -0.017461875, 0.038418856, -0.0029626482, -0.019318651, -0.009017645, -0.033886142, -0.02723725, 0.038992275, 0.050051007, -0.001547028, -0.029489955, -0.017243432, 0.026076766, -0.018758887, -0.006887816, 0.00899034, -0.0016007858, -0.020096857, -0.001960877, -0.045190625, -0.02798815, -0.07623699, 0.001326024, -0.04374343, 0.049204536, 0.06804534, -0.0460644, -0.007543148, -0.026431737, 0.015714323, 0.026076766, -0.01525013, -0.0021963872, 0.00891525, 0.0208068, -0.002046207, -0.01245814, 0.019550748, -0.016519835, -0.051580116, 0.0021537223, -0.08142504, 0.00076626096, -0.05635858, -0.012253349, -0.01828104, -0.047921177, -0.02099794, 0.04680165, 0.013529882, -0.030746007, -0.016260434, 0.03407728, 0.030527564, -0.04540907, -0.0084715355, 0.0070857806, 0.014813241, -0.033449255, -0.008730938, -0.017311696, -0.00946136, 0.01104508, 0.035278723, -0.024110768, -0.06394951, -0.022226688, -0.0056215227, -0.0058911643, -0.037162803, 0.00019849828, 0.027428389, -0.02431556, -0.015618754, 0.06864606, -0.080005154, -0.042159714, -0.061546627, 0.01802164, -0.038910355, 0.055293664, -0.010717414, 0.00948184, 0.030773314, 0.010669629, -0.011843766, -0.060290575, 0.009283874, 0.04740237, -0.0067444616, -0.063567236, -0.01317491, 0.0026042634, 0.002710072, -0.029544566, 0.027892582, 0.043524988, -0.018581402, 0.011495621, -0.084100984, -0.07143122, 0.051880475, 0.018745234, -0.020956982, -0.059198353, -0.043661516, -0.033066977, -0.07765688, -0.047320455, -0.0057341577, -0.022294952, -0.02798815, 0.015236476, -0.052071612, 0.035742916, -0.024124421, -0.03809119, -0.011768676, 0.03085523, -0.0054884083, 0.0033534584, 0.0062666154, 0.019059248, 0.070065945, 0.05368264, 0.017693972, -0.05482947, 0.015509532, -0.007399794, 0.058215354, 0.020438178, 0.013188563, 0.044398766, -0.006652306, -0.053054612, 0.007986862, -0.022963937, 0.0011169661, 0.013768805, -0.040193714, 0.017489182, 0.04185935, 0.014512881, 0.02932612, -0.008027821, -0.059416797, 0.010089387, -0.07831221, -0.017216126, 0.009024472, 0.03852808, -0.013188563, 0.050351366, 0.017844154, 0.054146834, -0.028998455, 0.038855746, 0.003140134, 0.014349047, 0.02327795, 0.013946291, 0.020192428, 0.0014488988, -0.039292634, -0.041531686, 0.010812983, -0.013946291, 0.028206596, -0.0021605487, -0.0039558862, -0.06411335, -0.005594217, 0.019004637, 0.005577151, 0.027646832, 0.023537353, 0.018144514, 0.0036486993, -0.06930139, 0.019223081, 0.031073675, 0.053955693, -0.017420918, 0.011161129, -0.0415863, 0.009597888, -0.0024643226, -0.028261207, 0.04284235, -0.024615921, -0.0029319294, -0.008642195, 0.034705307, -0.04005719, -0.0049047526, -0.015495879, 0.0063792504, -0.018171819, -0.0025479456, 0.00015231357, -0.04710201, 0.014649408, -0.025503349, 0.012560536, 0.022649923, -0.03768161, 0.00955693, 0.004583913, -0.002698126, -0.027701443, -0.024165379, -0.003329566, -0.008942556, 0.061601236, 0.053983, 0.01619217, 0.0050276276, 0.0028721986, 0.024179032, 0.024342865, 0.015195518, 0.029162288, -0.034049977, 0.006027692, -0.049341064, 0.016601752, 0.01624678, 0.037872747, 0.024970893, 0.020014942, -0.02084776, 0.03833694, 0.0012082689, -0.0029370494, -0.045682125, 0.05
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
Your data is your data.
|
|||
|
As of March 1, 2023, data sent to the OpenAI API will not be used to train or improve
|
|||
|
OpenAI models (unless you explicitly opt in). One advantage to opting in is that the
|
|||
|
models may get better at your use case over time.
|
|||
|
To help identify abuse, API data may be retained for up to 30 days, after which it will be
|
|||
|
deleted (unless otherwise required by law). For trusted customers with sensitive
|
|||
|
applications, zero data retention may be available. With zero data retention, request
|
|||
|
and response bodies are not persisted to any logging mechanism and exist only in
|
|||
|
memory in order to serve the request.
|
|||
|
Note that this data policy does not apply to OpenAI's non-API consumer services like
|
|||
|
ChatGPT or DALL·E Labs.
|
|||
|
Default usage policies by endpoint
|
|||
|
ENDP OINT
|
|||
|
DATA USED
|
|||
|
FOR TRAINING
|
|||
|
DEFAULT
|
|||
|
RETENTION
|
|||
|
ELIGIBLE FOR
|
|||
|
ZERO RETENTION
|
|||
|
/v1/chat/completions*
|
|||
|
No
|
|||
|
days
|
|||
|
Yes, except
|
|||
|
image inputs*
|
|||
|
/v1/files
|
|||
|
/v1/assistants
|
|||
|
/v1/threads
|
|||
|
/v1/threads/messages
|
|||
|
/v1/threads/runs
|
|||
|
/v1/threads/runs/steps
|
|||
|
/v1/images/generations
|
|||
|
/v1/images/edits
|
|||
|
/v1/images/variations
|
|||
|
/v1/embeddings
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
/v1/audio/transcriptions No
|
|||
|
Until deleted by
|
|||
|
No
|
|||
|
customer
|
|||
|
Until deleted by
|
|||
|
No
|
|||
|
customer
|
|||
|
days *
|
|||
|
days *
|
|||
|
days *
|
|||
|
days *
|
|||
|
days
|
|||
|
days
|
|||
|
days
|
|||
|
days
|
|||
|
Zero data
|
|||
|
retention
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
Yes
|
|||
|
-
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[0.0060474044, 0.04875077, 0.0706979, -0.03763124, -0.0042394856, -0.0174489, -0.022796359, 0.017236594, -0.0055232737, -0.0045280894, 0.046813477, -0.06422257, -0.008412626, -0.010767896, -0.0039906898, 0.0025592826, -0.024574421, 0.011444621, -0.043628886, 0.040019684, 0.027679397, 0.048565, -0.028634774, 0.0071387896, 0.013998928, -0.005453611, 0.019704653, 0.007331192, 0.016971212, -0.034658957, -0.011928944, -0.0282367, -0.04750347, 0.0043887636, 0.028024394, 0.01441027, 0.019691383, 0.004677367, -0.0065118237, -0.017647937, 0.003403531, -0.06984868, 0.008087533, 0.052519202, -0.040046223, 0.0271619, -0.0041897264, -0.0005900614, -0.028714389, 0.026989402, -0.048511926, 0.019439269, -0.04084237, 0.012718457, 0.0019953449, 0.0070260023, 0.007470518, 0.011683465, -0.0036622789, -0.0017017655, -0.014370464, -0.04110775, 0.014197965, -0.0005519127, 0.004916211, -0.0071719624, -0.052519202, 0.083807796, -0.014038735, 0.018258316, 0.0049759224, -0.019558692, -0.03582664, 0.00046690737, -0.0021811125, 0.009779346, 0.014463347, 0.069636375, 0.009593578, -0.04705232, -0.0021628675, 0.021668483, -0.043947347, 0.0015184856, -0.008890314, 0.014768537, -0.064275645, -0.0077690734, -0.024853073, 0.009241946, -0.058278, -0.022584053, -0.063957185, -0.005762118, 0.061515667, -0.020195609, 0.032907434, 0.0032443013, 0.010595397, 0.0049958257, -0.026073832, -0.034048576, -0.00047893252, 0.0251848, -0.009985018, -0.00023303903, 0.01913408, -0.01701102, -0.01913408, -0.015883144, -0.06576179, -0.025370568, -0.037445474, -0.027918242, -0.06241797, -0.0088107, -0.06316104, 0.016453717, 0.035853177, -0.012499517, -0.011942213, 0.049573455, 0.01882889, -0.01819197, 0.015976029, -0.009069447, -0.0065449965, -0.025410376, -0.016188333, -0.04991845, 0.03792316, 0.0146491155, 0.05174959, -0.05631417, -0.0636918, -0.04463734, -0.0037518453, 0.0018410912, -0.03917046, -0.006714178, 0.034340497, -0.023035202, -0.046388865, 0.063585654, -0.07489095, -0.015405456, -0.050343063, 0.005221401, 0.028289776, 0.035747025, -0.021920595, 0.06284258, 0.04538041, 0.051696517, 0.003907758, -0.017581591, 0.022743283, 0.066611014, -0.01221423, -0.04293889, -0.017501976, 0.04877731, -0.025344031, -0.005927982, -0.0024282502, 0.025012303, -0.017037557, -0.052917276, -0.085187785, -0.063267194, 0.047158472, 0.019611768, -0.033172816, -0.05172305, -0.04705232, -0.037578166, -0.007988014, -0.0035196356, 0.003924344, -0.05206805, -0.028794004, 0.0095272325, -0.058861844, 0.009248581, -0.037870087, -0.033623964, -0.02961669, 0.032243975, -0.02291578, 0.036967784, 0.006362546, -0.026763827, 0.06549641, 0.04538041, 0.0088107, -0.0382947, -0.0069729257, -0.03035976, 0.019863881, -0.022385016, 0.03763124, 0.032615513, -0.007437345, -0.040603526, 0.014901228, -0.030943602, 0.013017013, 0.009089352, -0.060613368, -0.0036224714, 0.025848258, 0.032721665, -0.009381272, -0.0021296947, -0.055358794, -0.025702298, -0.058331076, -0.007835419, 0.028714389, 0.02961669, -0.020898873, 0.03980738, 0.0516169, 0.029483998, -0.035720486, 0.005231353, -0.00940781, -0.024853073, -0.0122275, -0.020381378, 0.0013061796, 0.020819258, -0.038215082, -0.020434454, 0.02900631, -0.06119721, 0.031925518, -0.007118886, -0.005453611, -0.01730294, -0.018842159, -0.00964002, -0.024508076, 0.056844935, 0.015750453, 0.03200513, -0.0114247175, -0.07621786, 0.044982336, 0.008757623, 0.020845797, -0.0352428, 0.012041732, -0.056101866, 0.00039496383, -0.046123482, -0.013527874, 0.028502082, -0.019094272, 0.004348956, 0.048671152, 0.020593684, -0.0024116635, 0.0029042799, 0.011524236, 0.026325947, 0.00918887, -0.007861957, 0.006292883, -0.03611856, -0.016520062, -0.015617761, 0.052625354, -0.018669661, -0.03264205, 0.042301975, 0.030731296, -0.022146171, -0.066929474, -0.00028777416, -0.0379497, 0.011643658, 0.025078649, 0.011902406, 0.017661206, -0.00018213948, -0.015445262, 0.027732473, -0.026962863, 0.002350294, 0.013514604, -0.0062962, 0.027095554, -0.032562435, 0.024667306, -1.1241178e-05, 0.062895656, 0.0108010685, 0.0030784372, -0.002272338, 0.039701223, -0.010880684, -0.020354839, -0.029218616,
|
|||
|
"26/02/2024, 17:58
|
|||
|
Models - OpenAI API
|
|||
|
ENDP OINT
|
|||
|
DATA USED
|
|||
|
FOR TRAINING
|
|||
|
DEFAULT
|
|||
|
RETENTION
|
|||
|
ELIGIBLE FOR
|
|||
|
ZERO RETENTION
|
|||
|
/v1/audio/translations
|
|||
|
No
|
|||
|
/v1/audio/speech
|
|||
|
/v1/fine_tuning/jobs
|
|||
|
/v1/moderations
|
|||
|
/v1/completions
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
No
|
|||
|
Zero data
|
|||
|
retention
|
|||
|
days
|
|||
|
Until deleted by
|
|||
|
customer
|
|||
|
Zero data
|
|||
|
retention
|
|||
|
-
|
|||
|
No
|
|||
|
No
|
|||
|
-
|
|||
|
days
|
|||
|
Yes
|
|||
|
* Image inputs via the gpt-4-vision-preview model are not eligible for zero
|
|||
|
retention.
|
|||
|
* For the Assistants API, we are still evaluating the default retention period during the
|
|||
|
Beta. We expect that the default retention period will be stable after the end of the
|
|||
|
Beta.
|
|||
|
For details, see our API data usage policies. To learn more about zero retention, get in
|
|||
|
touch with our sales team.
|
|||
|
Model endpoint compatibility
|
|||
|
ENDP OINT
|
|||
|
L ATE ST MODEL S
|
|||
|
/v1/assistants
|
|||
|
All models except gpt-3.5-turbo-0301
|
|||
|
supported. The retrieval tool requires gpt-4-
|
|||
|
turbo-preview (and subsequent dated model
|
|||
|
releases) or gpt-3.5-turbo-1106 (and
|
|||
|
subsequent versions).
|
|||
|
/v1/audio/transcriptions whisper-1
|
|||
|
/v1/audio/translations
|
|||
|
whisper-1
|
|||
|
/v1/audio/speech
|
|||
|
tts-1, tts-1-hd
|
|||
|
/v1/chat/completions
|
|||
|
gpt-4 and dated model releases, gpt-4-turbo-
|
|||
|
preview and dated model releases, gpt-4-
|
|||
|
vision-preview, gpt-4-32k and dated model
|
|||
|
releases, gpt-3.5-turbo and dated model
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.0037567662, 0.028555367, 0.065682605, -0.056532264, -0.059950497, 0.002938363, 0.00306819, 0.04004588, -0.0024568527, -0.021166733, 0.029712306, -0.054428738, -0.02716178, -0.021613732, -0.01189807, 0.0147378305, -0.039704055, 0.011352467, -0.039835528, 0.032420598, 0.030395953, 0.047750045, -0.040492877, -0.015105947, 0.0186425, 0.0035431269, -0.0152242705, 0.019602234, 0.040598053, -0.02383558, 0.013232494, -0.028739426, -0.046487927, -0.011944084, 0.024755873, 0.014790419, 0.02086435, 0.011135542, -0.020785468, 0.0020098535, 0.011102674, -0.054270975, -0.0022399267, 0.037784588, -0.016985973, 0.028160956, 0.010392734, 0.009972028, -0.023993345, 0.0016622787, -0.026425548, 0.048670337, -0.012594863, 0.057373676, 0.0015464204, -0.011944084, 0.02086435, -0.0045521623, 0.005738682, 0.0027033598, -0.0105373515, -0.0066392543, 0.0027280105, 0.007559547, 0.001261294, -0.019852027, -0.039178174, 0.07530624, -0.022218496, -0.013962155, -0.0075924145, -0.009268662, -0.06294802, -0.031763244, 0.006928489, 0.02480846, 0.014356566, 0.062054023, 0.0035168328, -0.055112384, -0.03199989, 0.0073952093, -0.051010508, -0.008045987, -0.00047822352, 0.032709833, -0.053350683, -0.020128116, -0.018537324, 0.002146254, -0.051904507, -0.014448595, -0.035707355, -0.0014576779, 0.05158898, -0.045935754, 0.023914464, -0.017945707, -0.00076581497, 0.009433, -0.009926014, -0.01567127, -0.008276061, 0.026911987, -0.01200982, -0.02837131, 0.010958057, -0.040860996, -0.031237364, 0.034156006, -0.09218703, 0.00031285844, -0.019418176, -0.019050058, -0.027424723, -0.022087025, -0.039835528, -0.026754223, -0.0093606915, -0.020969527, -0.009636779, 0.072150946, 0.011582541, -0.015211123, 0.009649926, 0.037074648, -0.010898895, -0.011694291, -0.012180731, -0.046803456, 0.009689367, 0.011181557, 0.042123113, -0.046487927, -0.02916013, -0.03386677, -0.016578415, -0.0040525747, -0.051510096, 0.016144563, 0.0461724, -0.03844194, -0.048407394, 0.032788713, -0.08045988, -0.017156886, -0.028345015, -0.011976952, -0.010346719, 0.061896257, -0.013988449, 0.034997415, 0.015789593, 0.0147115365, -0.023414876, 0.021100996, 0.0010106786, 0.055112384, -0.012706612, -0.042096816, 0.018156061, 0.0050418894, 0.0107674245, -0.017248914, 0.008328649, 0.024256285, -0.010451895, -0.012285908, -0.086139396, -0.06158073, 0.042911932, 0.025150284, -0.039704055, -0.051378626, -0.021271909, -0.014317125, -0.010280984, -0.011556246, -0.0032571787, -0.057058148, -0.015552946, 0.019786293, -0.0073163267, 0.031579185, -0.017985148, -0.024703285, -0.041176524, 0.02734584, -0.026346665, 0.014014743, 0.009091177, -0.008907119, 0.07551659, 0.068837896, 0.01722262, -0.03244689, -0.0041873315, -0.019865176, 0.04088729, -0.010583366, 0.019339293, 0.031605482, 0.0079013705, -0.05463909, 0.03050113, -0.03360383, -0.0013155255, 0.01107638, -0.04767116, -0.029054955, 0.037758294, 0.024532374, 0.015868476, -0.012976127, -0.062211785, -0.0056565134, -0.050905332, -0.0073031797, 0.025912812, 0.016236592, -0.018234942, 0.010958057, 0.058530614, 0.0612652, -0.019641675, 0.030842952, -0.0007707451, -0.030948129, -0.007868502, -0.013002421, -0.00905831, -0.024295727, -0.025229167, -0.002700073, 0.002419055, -0.040151056, 0.035891414, -0.007618709, -0.008992574, -0.045304693, -0.024308873, -0.0079013705, 0.0031158482, 0.012062408, 0.04093988, 0.026491283, -0.0019654823, -0.080144346, 0.066734366, -0.03520777, 0.038205292, -0.02583393, 0.023309698, -0.011267012, 0.0039013836, -0.029554542, -0.03681171, 0.02490049, -0.04798669, 0.014935035, 0.026951429, 0.009774823, 0.0035464137, -0.0013319594, -0.008972853, 0.018589912, 0.018984323, 0.00719143, -0.018760825, -0.030159306, -0.029580837, -0.029686013, 0.05051092, -0.008282634, -0.020956378, 0.06068673, 0.009038589, -0.027582487, -0.05074757, -0.006001623, -0.046224985, -0.0021396806, -0.01660471, 0.013883272, 0.011930937, 0.013153612, -0.008492987, 0.007796194, -0.035812534, 0.03257836, 0.032788713, -0.015013918, 0.027135488, -0.046856046, 0.03005413, 0.0033607117, 0.060581554, -0.024203697, -0.0001955622, -0.012121569, 0.069679305, 0.011779746,
|
|||
|
"26/02/2024, 17:58
|
|||
|
ENDP OINT
|
|||
|
Models - OpenAI API
|
|||
|
L ATE ST MODEL S
|
|||
|
releases, gpt-3.5-turbo-16k and dated model
|
|||
|
releases, fine-tuned versions of gpt-3.5-turbo
|
|||
|
/v1/completions (Legacy) gpt-3.5-turbo-instruct, babbage-002,
|
|||
|
davinci-002
|
|||
|
/v1/embeddings
|
|||
|
text-embedding-3-small, text-embedding-
|
|||
|
-large, text-embedding-ada-002
|
|||
|
/v1/fine_tuning/jobs
|
|||
|
gpt-3.5-turbo, babbage-002, davinci-002
|
|||
|
/v1/moderations
|
|||
|
text-moderation-stable, text-
|
|||
|
https://platform.openai.com/docs/models/overview
|
|||
|
/10","[-0.010645703, 0.045364063, 0.08878396, -0.07717291, -0.073176555, -0.006237559, -0.017241044, 0.036588278, -0.027150933, -0.0124548655, 0.049711455, -0.041367706, -0.052708723, -0.055192944, -0.0057312637, -0.0034326825, -0.019468743, -0.0025989828, -0.042339794, 0.039072502, 0.038667463, -0.008755535, -0.019455243, -0.0063556945, 0.014878333, 0.019833276, -0.016606487, 0.010868474, 0.011557035, -0.017983612, 0.020386826, -0.035643194, -0.017767591, 0.0057987696, 0.009275331, 0.024126662, 0.033645015, 0.03294295, -0.00142269, 0.021682942, -0.015904425, -0.055084936, -0.02377563, 0.058217216, -0.009579108, 0.001156041, 0.00051515555, -0.012144338, -0.025760308, 0.028973596, -0.008431505, 0.029675659, -0.030296715, 0.06561588, -0.019684764, -0.020953877, -0.021021383, 0.0009062687, 0.00814798, -0.023033064, -0.02411316, -0.0072974036, 0.015418381, 0.0013729043, -0.020778362, -0.023316588, -0.047389247, 0.062321585, -0.030431727, -0.0026529876, -0.0102069145, 0.028136522, -0.03502214, -0.021588434, 0.0020353075, -0.003353363, -0.0057751425, 0.07566078, 0.017173538, -0.02924362, -0.027488463, -0.0038714719, -0.027812492, -0.013973752, -0.008438256, -0.0048604356, -0.03637226, 0.0065480866, -0.046471164, -0.020548841, -0.061133478, -0.038910486, -0.006888992, -0.0023205203, 0.053653806, -0.03437408, -0.0069598737, -0.015593898, -0.008411254, 0.051385604, -0.019063707, -0.0070071276, 0.023519108, 0.008796038, -0.010692958, 0.0033702394, 0.026516376, -0.04477001, -0.046498165, -0.0117055485, -0.086569756, -0.029297626, -0.03915351, -0.00362845, -0.02466671, -0.025976328, 0.0019070458, -0.0015610773, 0.014675815, -0.027245441, -0.0056165033, 0.02991868, -0.0049279416, -0.027204938, -0.01852366, 0.0457691, 0.0032959827, -0.034968134, 0.021142894, -0.026205847, -0.03747936, 0.024815224, 0.039909575, -0.04074665, -0.04093567, -0.048901383, -0.04409495, 0.010510691, -0.03718233, 0.021979969, 0.026408367, -0.03180885, -0.025490284, 0.04277183, -0.07042231, -0.01975227, -0.031997867, -0.0076619363, -0.026637886, 0.029378632, -0.032753933, 0.031727843, 0.015863921, 0.017835097, -0.015202362, -0.029189615, -0.012090333, 0.042879842, 0.014270779, -0.051736634, -0.0068923677, 0.034671105, 0.008971554, 0.020049296, 0.045796104, 0.035751205, -0.0042495057, 0.01818613, -0.08538165, -0.0635637, 0.064751804, 0.024450691, -0.02511225, -0.028865587, -0.027029421, 0.00630844, -0.0602694, -0.01853716, -0.03993658, -0.0435279, -0.028055513, 0.03426607, -0.040665645, 0.028946593, -0.038370438, -0.029108608, -0.016430972, 0.04050363, -0.0038005905, 0.017686585, 0.0034023048, 0.0011096307, 0.03996358, 0.027947504, 0.009363089, -0.02532827, 0.008836541, -0.034887124, 0.06718202, -0.002172007, 0.01640397, 0.045958117, -0.029378632, -0.058433235, 0.01597193, -0.035508182, -0.03070175, 0.007378411, -0.028298534, -0.03269993, 0.040395617, 0.0069463723, -0.00293145, -0.028298534, -0.009241578, -0.030890768, -0.059999377, -0.01818613, 0.02634086, 0.0070138783, -0.0076551856, 0.017686585, 0.04477001, 0.06464379, -0.0077091907, 0.002506162, 0.0032909198, -0.0039356025, 0.006629094, 0.0030040191, 0.012211844, -0.021466924, 0.0008336997, -0.03704732, -0.008458508, 0.01094273, 0.032213885, -0.041799746, -0.007985965, -0.061565515, -0.027056424, 0.0010159661, -0.015175359, 0.006642595, 0.04228579, 0.027866496, 0.00982213, -0.0737166, 0.01999529, 0.014257277, 0.05638105, -0.0412867, 0.019266225, -0.043365885, 0.009781626, -0.011016987, -0.053734813, 0.035913218, -0.029756665, -0.027704483, -0.0033685518, 0.038424443, -0.026759397, 0.008748784, -0.0039322274, 0.012097084, 0.016093442, 0.017092532, 0.019549752, -0.026097838, 0.030863766, -0.033320986, 0.01998179, 0.0020842492, -0.04879337, 0.039774563, -0.0071286387, -0.0028555058, -0.027542468, -0.03259192, 0.002085937, -0.018996201, 0.03672329, 0.027704483, -0.006409699, 0.026435368, -0.013420203, 0.022790043, 0.012238846, -0.0013990628, 0.047956295, -0.038262427, 0.013123176, -0.05945933, 0.045256056, 0.002869007, 0.041340705, -0.00893105, 0.027947504, -0.02443719, 0.04198876, -0.027609974, -0.039720558, -
|
|||
|
,"[0.015368387, -0.034810703, -0.009328825, 0.014480682, 0.0073433784, 0.014409349, -0.052247763, 0.049235906, -0.013592978, 0.015106832, 0.008250898, 0.03281337, -0.04172212, -0.015447646, 0.020306244, 0.06340747, -0.045526568, 0.027027437, -0.007763453, 0.01865765, 0.07437697, 0.014821498, -0.016676167, -0.030736774, 0.040105227, -0.014940387, 0.0031347072, -0.011730383, 0.027534697, -0.058905546, 0.044797383, -0.04248301, 0.003695467, -0.018150391, -0.01840402, 0.05646436, 0.024728917, 0.003093096, 0.025759287, 0.026868919, -0.0035904483, 0.028866254, -0.028454104, 0.03706167, 0.024237508, 0.02017943, -0.03197322, 0.023603434, 0.020797653, 0.05478406, -0.037442114, -0.031434257, -0.03230611, 0.07995683, -0.038012784, 0.0055045616, -0.023222988, 0.015201943, 0.003400226, -0.0066934517, -0.01643839, -0.02553736, 0.035349667, -0.005599673, -0.009994604, 0.020005058, 0.001957706, 0.037442114, 0.03842493, 0.015447646, -0.026187288, 0.04181723, -0.029516181, -0.0037331153, -0.029817365, 0.046192348, -0.03171959, 0.012348606, 0.00638434, 0.009519047, -0.02171706, 0.016834686, -0.010596975, -0.023952175, -0.021304913, -0.051169835, 0.006178266, -0.006951045, -0.005112228, -0.045780197, -0.0072601563, -0.0069470815, -0.016279869, -0.018847873, 0.065499924, 0.002686892, 0.010882308, 0.0012047421, -0.014227052, 0.032845072, 0.014385572, -0.04809457, -0.03962967, 0.012198013, 0.022969358, 0.07589875, 0.002785966, -0.010264086, -0.025299583, 0.04486079, -0.021162245, -0.050187018, 0.000848075, 0.019307576, -0.0047119684, 0.0070620077, 0.025584918, -0.10202263, 0.018102834, -0.029833218, -0.02493499, -0.009384306, 0.031656183, -0.028676031, -0.004597042, 0.02349247, -0.028057808, 0.010715864, -0.0034715594, -0.014195349, 0.023222988, -0.025473954, 0.028279735, -0.024364322, -0.041341674, 0.03468389, -0.02772492, -0.043656047, -0.010818901, 0.022271877, 0.03401811, -0.016034165, 0.031751294, -0.006752896, 0.0330987, 0.009170306, 0.002904855, -0.019529503, 0.004846709, -0.035000928, 0.030245366, 0.006087118, -0.017658982, 0.008025009, -0.006455674, -0.069558, 0.012372384, -0.005698747, -0.047872644, 0.0064715254, -0.017769946, 0.004616857, -0.028200475, -0.009653788, -0.046667904, 0.009844011, -0.061695475, 0.021669505, -0.09993018, 0.018134538, -0.023460766, 0.031656183, -0.061188214, 0.038900487, 0.02070254, -0.026932325, 0.007279971, -0.059793252, -0.064041555, 0.008813639, 0.014480682, 0.06213933, -0.046255756, -0.002498651, -0.027788326, 0.0116907535, -0.04061249, 0.03411322, 0.027106697, -0.039217524, -0.010890234, 0.02136832, 0.01251505, 0.02407899, 0.035476483, -0.051106427, -0.010739641, 0.005789895, -0.04876035, -0.0049933386, -0.036522705, -0.05272332, 0.042958565, -0.034271743, 0.00069401466, -0.048316497, -0.023460766, 0.03019781, 0.019624613, -0.028168771, 0.018055279, -0.03240122, 0.02273158, -0.008195416, -0.04885546, -0.007910083, 0.0007831814, 0.02230358, 0.0031148924, 0.01840402, -0.07063593, -0.0045693014, 0.067719184, 0.028818699, 0.038266413, 0.051867317, -0.01594698, -0.039376043, -0.0038599302, -0.068670295, -0.02273158, 0.011857199, -0.023809507, -0.05462554, 0.0017050667, -0.005960303, 0.032369517, 0.02357173, 0.010065937, -0.05503769, -0.023698544, -0.018879576, 0.008583787, 0.025220323, 0.016723722, 0.03018196, 0.03060996, 0.002478836, 0.0003784634, 0.021954838, 0.00028236143, -0.0029365588, -0.040771008, 0.009685492, 0.04061249, -0.02442773, -0.024459435, -0.001542585, 0.004751598, -0.013220459, -0.044733975, -0.013085718, -0.01284794, 0.010478086, -0.038615152, -0.014948313, 0.012015717, 0.02934181, 0.021986542, -0.0037846337, -0.016596908, -0.05462554, 0.02247795, -0.011231049, -0.05893725, -0.023032766, 0.053737838, 0.029405218, 0.0033130406, 0.04977487, -0.034461964, -0.025711732, -0.009867788, -0.0070104892, -0.0071095633, 0.031909812, -0.0016198629, -0.024269212, -0.035476483, 0.0012562607, 0.029738106, -0.062202737, 0.04137338, -0.011429198, -0.013878312, 0.045938715, -0.013537496, -0.042768344, 0.005445117, 0.024443582, 0.058747027, 0.038266413, -0.014900757, 0.0023361691, -0.03121233, 0.07989342
|
|||
|
"**GPT-4 and GPT-4 Turbo**
|
|||
|
GPT-4 is a sophisticated multimodal model capable of processing both text and image inputs to produce text outputs. It is designed to tackle complex problems with higher accuracy than previous models, leveraging its extensive general knowledge and advanced reasoning skills. GPT-4 is accessible through the OpenAI API for paying customers and is optimized for chat applications, although it can also handle traditional completion tasks using the Chat Completions API.
|
|||
|
**Model Versions:**
|
|||
|
. **gpt-4-0125-preview**
|
|||
|
- **Description:** This is the latest GPT-4 Turbo model, designed to minimize instances where the model fails to complete a task, known as ""laziness."" It can return up to 4,096 output tokens.
|
|||
|
- **Context Window:** 128,000 tokens
|
|||
|
- **Training Data:** Up to December 2023
|
|||
|
. **gpt-4-turbo-preview**
|
|||
|
- **Description:** This version currently points to the gpt-4-0125-preview model.
|
|||
|
- **Context Window:** 128,000 tokens
|
|||
|
- **Training Data:** Up to December 2023
|
|||
|
. **gpt-4-1106-preview**
|
|||
|
- **Description:** This version of GPT-4 Turbo includes enhancements such as improved instruction following, JSON mode, reproducible outputs, and parallel function calling. It also supports up to 4,096 output tokens.
|
|||
|
- **Context Window:** 128,000 tokens
|
|||
|
- **Training Data:** Up to April 2023
|
|||
|
These models are part of OpenAI's ongoing efforts to provide developers with robust tools for various applications, ensuring flexibility and improved performance across different use cases.","[-0.017464949, 0.021525647, 0.0552991, -0.013397679, -0.010867955, -0.035271574, 0.022090727, 0.08920396, 0.025980588, 0.012339794, 0.03782101, -0.0003983493, -0.017188977, -0.069334134, -0.042972445, -0.014087603, -0.040948667, -0.018095735, -0.038977455, 0.043682083, 0.032800987, -0.042683333, -0.017964322, -0.04023903, 0.022327274, 0.014324148, -0.052118875, -0.006642988, 0.0069518117, -0.030093852, 0.008975591, -0.023378588, -0.026624518, -0.01638735, 0.010309445, -0.029831026, 0.0070635136, 0.047493093, 0.009317268, 0.009402687, -0.010815389, -0.028332902, -0.034351673, 0.042893596, -0.0039982772, 0.022997485, 0.033904865, -0.022813506, -0.024298487, 0.01914705, -0.036795978, 0.06271086, -0.021381091, 0.03910887, -0.03440424, -0.030698359, -0.039266564, -0.023063194, 0.016426776, -0.014665825, -0.01848998, -0.011755001, 0.039976202, 0.02173591, -0.028359186, -0.038898606, -0.018976212, 0.06013514, -0.0284906, 0.012983724, 0.0030783778, 0.005683664, -0.026966196, -0.030645793, 0.026348548, 0.019265322, 0.01739924, 0.026046297, 0.01628222, -0.03219648, -0.008482787, 0.0044910805, -0.027018761, -0.03164454, -0.0016936006, 0.0074314736, -0.033221513, -0.017083846, -0.032249045, -0.027097609, -0.02412765, -0.026033154, -0.012017829, 0.010053187, 0.03994992, -0.031749673, -0.015428028, -0.019659566, -0.005956349, 0.045837276, -0.008771898, 0.009264702, -0.023299739, 0.018660817, 0.036638282, 0.007372337, 0.00085583504, -0.020185223, -0.046862308, 0.001981069, -0.07974214, -0.019199615, -0.027518135, -0.00034167693, 0.0016821019, -0.037978705, -0.012320082, -0.0051547224, 0.0041855425, -0.05374841, -0.017964322, 0.017543796, 0.031013753, -0.03143428, -0.012333224, 0.016939292, 0.013943047, -0.046100102, 0.036506865, -0.0015137274, -0.031486843, 0.0028286907, 0.032433026, -0.033142664, -0.0035580397, -0.029909873, -0.054090086, 0.020211505, -0.052697096, -0.0020829153, -0.02191989, -0.010519708, -0.01479724, 0.049043782, -0.05797995, -0.026716508, -0.031749673, -0.0027580557, -0.0837897, 0.040843535, -0.025638912, 0.023549426, 0.0130822845, -0.042236526, -0.006317738, -0.01784605, 0.021670202, 0.068387955, -0.01054599, -0.078848526, 0.0047670505, -0.015441169, -0.005105442, 0.0038405801, 0.010381722, 0.03571838, 0.005115298, 0.020093232, -0.0961952, -0.05871587, 0.049700852, -0.00031621545, -0.06087106, 0.0384518, 0.009442111, 0.0002650871, -0.06749434, -0.014941796, -0.04486481, -0.04817645, -0.014849805, -0.018108878, -0.014100744, -0.010986228, -0.062815994, -0.02922652, 0.033458058, -0.013548804, 0.0021995453, 0.034614503, 0.020027526, 0.0034167694, 0.05871587, 0.022432406, -0.023785971, -0.020185223, 0.027728397, -0.011958693, 0.038504362, 0.016847301, 0.024167072, 0.01980412, -0.026887346, -0.03495618, 0.05445805, -0.035481837, 0.011130784, -0.0076943017, -0.042499356, -0.015296614, 0.027465569, -0.0012623977, -0.0066725565, -0.0057230885, -0.04817645, -0.033090096, -0.026243417, -0.010736541, 0.028516883, 0.030330399, -0.011761571, 0.021749051, 0.015769705, 0.014915513, -0.022419265, 0.019567575, 0.019488728, -0.004412232, 0.0118075665, -0.014061321, -0.020829152, -0.022445546, -0.014994361, -0.03219648, -0.024771579, -0.03542927, 0.05540423, -0.008239671, 0.005900498, -0.094828494, -0.014205876, 0.036717128, 0.039161433, -0.01952815, 0.031250298, 0.0010710257, -0.032984965, -0.08725903, 0.036112625, 0.0013354969, 0.030566944, -0.035245292, -0.007168645, 0.021131404, 0.01674217, 0.004714485, 0.00047432314, 0.031145167, -0.049884833, -0.032249045, 0.025008123, 0.014100744, -0.03976594, -0.0057395156, -0.015703999, 0.01905506, 0.009488106, 0.004698058, -0.025086973, -0.03766331, 0.052013744, -0.0034561937, 0.0032541442, 0.01312828, -0.06618019, 0.018253433, -0.030961188, 0.010118894, -0.032800987, 0.01969899, -0.022616385, -0.017740918, 0.044549417, 0.020093232, -0.0042151106, -0.00878504, 0.053406734, 0.00024619632, 0.012589481,
|
|||
|
"**Models - OpenAI API Overview**
|
|||
|
This document provides an overview of various GPT-4 models, highlighting their capabilities, context windows, and training data timelines.
|
|||
|
. **gpt-4-vision-preview**
|
|||
|
- **Description**: This model has the ability to understand images, in addition to all other GPT-4 Turbo capabilities. It currently points to the gpt-4-1106-vision-preview model.
|
|||
|
- **Context Window**: 128,000 tokens
|
|||
|
- **Training Data**: Up to April 2023
|
|||
|
. **gpt-4-1106-vision-preview**
|
|||
|
- **Description**: Similar to the gpt-4-vision-preview, this model can understand images and includes all GPT-4 Turbo capabilities. It returns a maximum of 4,096 output tokens and is a preview model version.
|
|||
|
- **Context Window**: 128,000 tokens
|
|||
|
- **Training Data**: Up to April 2023
|
|||
|
. **gpt-4**
|
|||
|
- **Description**: This model currently points to gpt-4-0613 and includes continuous model upgrades.
|
|||
|
- **Context Window**: 8,192 tokens
|
|||
|
- **Training Data**: Up to September 2021
|
|||
|
. **gpt-4-0613**
|
|||
|
- **Description**: A snapshot of gpt-4 from June 13th, 2023, with improved function calling support.
|
|||
|
- **Context Window**: 8,192 tokens
|
|||
|
- **Training Data**: Up to September 2021
|
|||
|
. **gpt-4-32k**
|
|||
|
- **Description**: This model points to gpt-4-32k-0613 and includes continuous model upgrades. It was not widely rolled out in favor of GPT-4 Turbo.
|
|||
|
- **Context Window**: 32,768 tokens
|
|||
|
- **Training Data**: Up to September 2021
|
|||
|
. **gpt-4-32k-0613**
|
|||
|
- **Description**: A snapshot of gpt-4-32k from June 13th, 2023, with improved function calling support. Like gpt-4-32k, it was not widely rolled out in favor of GPT-4 Turbo.
|
|||
|
- **Context Window**: 32,768 tokens
|
|||
|
- **Training Data**: Up to September","[-0.04418161, 0.026578976, 0.045031738, -0.019877974, -0.029729448, -0.03047956, -0.002489435, 0.06365953, 0.0058508753, 0.017927682, 0.028704295, -0.019840468, -0.0029144986, -0.050557565, -0.034055095, -0.022090806, -0.05445815, 0.007051055, -0.039280877, 0.055758342, 0.013201975, -0.038205717, -0.008770062, -0.024366146, 0.007513624, 0.011514222, -0.034580175, 0.0052851657, 0.007101062, -0.022265831, 0.008232482, -0.025428804, -0.037880667, -0.018827816, -0.008313743, -0.027354093, -0.02025303, 0.023416003, -0.009795216, 0.015327293, 0.0027488486, -0.023716047, -0.03763063, 0.052757893, -0.0010782863, 0.001367392, 0.02652897, -0.027954182, -0.044531662, 0.02239085, -0.018665293, 0.06450965, -0.024766205, 0.017690146, 0.0036005387, -0.006169673, -0.037405595, -0.038380742, 0.019440409, -0.020865621, -0.02652897, -0.014664694, 0.025778856, 0.017815165, -0.013176971, -0.05305794, -0.034005087, 0.05200778, -0.018990342, 0.013414507, 0.031454705, 0.022365846, -0.028354242, 0.0003133281, 0.027879171, 0.018402753, 0.012939435, 0.05440814, -0.013427009, -0.035255276, 0.0037818158, 0.0075636315, -0.027629133, -0.026728999, -0.0021706372, 0.012683148, -0.012739406, -0.00528204, -0.02031554, -0.009107613, -0.032654885, -0.03383006, -0.03890582, -0.0042662635, 0.02560383, -0.03375505, -0.0037943176, -0.021978289, 0.0059727686, 0.05315795, -0.022565875, -0.0060415287, -0.01617742, 0.024291134, 0.04070609, 0.018827816, 0.004244385, -0.01631494, -0.040131003, 0.01503975, -0.10081508, -0.027054047, -0.004191252, -0.010807867, -0.019202873, -0.029254377, -0.017152566, -0.011926784, 0.020428056, -0.04765713, -0.023228476, 0.022703396, 0.036955528, -0.031529717, 0.018152716, 0.016277436, 0.020690596, -0.038055692, 0.032454856, -0.010801616, -0.022115808, 0.019427907, 0.028979335, -0.038605776, -0.010770361, -0.04318146, -0.0528079, 0.017365098, -0.038380742, 0.011051654, 0.0027488486, -0.011014148, -0.018202724, 0.048157204, -0.04473169, -0.0062540607, -0.0280792, -0.0076573957, -0.055908363, 0.049307376, -0.023478512, 0.036805507, 0.026353942, -0.032579873, -0.014652192, -0.024603682, 0.007051055, 0.078761786, -0.0072448337, -0.061209157, 0.005238284, 0.0044600423, -0.00012453034, -0.004831973, -0.02219082, 0.04290642, -0.007838673, 0.0111329155, -0.08176223, -0.07501122, 0.038730793, 0.030129507, -0.024416152, 0.007126066, 0.020027997, -0.0069135344, -0.035930376, 0.00055359845, -0.027854167, -0.05315795, -0.031704742, -0.011326695, -0.014114612, -0.017102558, -0.040406045, -0.016677495, 0.0059321374, 0.003000449, -0.011051654, 0.034530167, 0.024428654, 0.02412861, 0.058258716, 0.029379396, -0.0020206147, -0.03370504, 0.010045253, -0.021140663, 0.05088261, 0.0022597131, 0.032904923, 0.026904024, -0.024816213, -0.051182657, 0.05620841, -0.05125767, 0.03620542, -0.014977241, -0.05775864, 0.00828874, 0.027179066, -0.015002244, 0.016614987, -0.0039880965, -0.043631528, -0.040456053, -0.031229673, -0.020140514, 0.043756545, 0.028054196, 0.0047288323, 0.031629734, 0.025703846, 0.031229673, -0.02554132, 0.042531364, 0.0044287876, -0.012008047, 0.016965037, -0.012989444, -0.02446616, -0.015464813, -0.025491314, -0.025703846, -0.01877781, -0.039530914, 0.056958523, -0.020040499, -0.0021190671, -0.092863895, 0.011826769, 0.027679142, 0.00922638, 0.022553375, 0.03287992, 0.018040199, -0.0071573206, -0.10221529, 0.033379994, 0.013614537, 0.0427814, -0.026929028, -0.0180527, 0.01859028, 0.031179665, 0.0061978023, -0.013889578, 0.02011551, -0.062659375, -0.028504264, 0.025366295, 0.042631377, -0.013827069, -0.012720653, -0.023778558, 0.027729148, -0.022078304, -0.010326545, -0.026503965, -0.06255936, 0.053307977, -0.0021503216, 0.010782863, 0.0010415621, -0.05975894, 0.0073198453, -0.0054351883, 0.004122492, -0.021165667, 0.023766056, -0.0025738226, -0.01797769, 0.036280427, 0.036955528, -0.010507822, -0.012683148, 0.031504713, 0.0014173995, -0.0025113132, -0.020103008, 0.043956578, -0.03355502, 0.016952537, -0.04235634, 0.049582418, 0.029179366, 0.05175774, 0.016477466, 0.012826919, -0.009520174, 0.042106
|
|||
|
"**Multilingual Capabilities and GPT-3.5 Turbo**
|
|||
|
**Multilingual Capabilities**
|
|||
|
GPT-4 surpasses previous large language models and, as of 2023, most state-of-the-art systems. It excels in the MMLU benchmark, which involves English-language multiple-choice questions across 57 subjects. GPT-4 not only outperforms existing models in English but also shows strong performance in other languages.
|
|||
|
**GPT-3.5 Turbo**
|
|||
|
GPT-3.5 Turbo models are designed to understand and generate natural language or code. They are optimized for chat using the Chat Completions API but are also effective for non-chat tasks.
|
|||
|
**Model Descriptions:**
|
|||
|
. **gpt-3.5-turbo-0125**
|
|||
|
- **Description:** Updated GPT-3.5 Turbo with improved accuracy and a fix for a text encoding bug in non-English language function calls. It returns up to 4,096 output tokens.
|
|||
|
- **Context Window:** 16,385 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
. **gpt-3.5-turbo**
|
|||
|
- **Description:** Currently points to gpt-3.5-turbo-0613. The alias will automatically upgrade to gpt-3.5-turbo-0125 on February 16th.
|
|||
|
- **Context Window:** 4,096 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
. **gpt-3.5-turbo-1106**
|
|||
|
- **Description:** Features improved instruction following, JSON mode, reproducible outputs, and parallel function calling. It returns up to 4,096 output tokens.
|
|||
|
- **Context Window:** 16,385 tokens
|
|||
|
- **Training Data:** Up to September 2021","[-0.044201642, 0.021855256, 0.062318858, -0.02313765, -0.01571614, -0.034106206, -0.0032844276, 0.072359726, 0.019986236, 0.021186775, 0.03233268, -0.010272789, -0.029031202, -0.03255096, -0.024761105, -0.013928974, -0.052687265, -0.01600263, -0.021855256, 0.025743363, 0.043219384, -0.025934359, -0.018267283, -0.018553775, 0.03396978, 0.024365474, -0.043874223, 0.014038114, 0.0064972322, -0.0038403587, 0.02462468, -0.027857948, -0.033287656, -0.009624771, -0.00939967, -0.00830145, 0.008444697, 0.035033893, 0.012462407, 0.010429678, -0.026957544, -0.035143033, -0.025552368, 0.018717485, -0.016466476, 0.023342287, 0.028430933, -0.010566102, -0.043055672, 0.020586506, -0.022687448, 0.05909923, -0.025838861, 0.009536095, -0.02446097, -0.0238607, -0.041309435, -0.020245444, 0.021186775, -0.046739142, -0.018540133, -0.010545638, 0.025306804, 0.012823933, -0.01495216, -0.024229048, -0.008049064, 0.037789676, -0.019918023, 0.0021998503, 0.009024502, 0.017844366, -0.030259024, -0.048076108, 0.0016243081, 0.016971247, -0.004430396, 0.044310782, 0.002274884, -0.058444392, -0.022414599, -0.0046964246, -0.025265876, -0.03457005, 0.017953506, 0.030313594, -0.0149385175, -0.035443168, -0.026411844, -0.042728253, -0.026698338, -0.04583874, -0.024651965, 0.0029041434, 0.041882418, -0.038935643, 0.0039699622, -0.013349169, -0.026862048, 0.043519516, -0.00033338816, -0.0071213758, -0.0045736423, 0.01571614, 0.022960298, 0.0019201793, 0.010218219, -0.032932952, -0.020695645, 0.011978099, -0.10668421, 0.011998563, -0.0057912334, 0.004645265, -0.01198492, -0.030804724, 0.0018263872, 0.004041585, -9.816192e-05, -0.03023174, -0.0035402242, 0.011882601, 0.021405054, -0.046002448, 0.006909917, 0.016903035, 0.017121315, -0.034597334, 0.0142700365, 0.009004038, -0.018812982, 0.002566492, 0.042755537, -0.033342227, -0.012885324, -0.020327298, -0.056589015, -0.0031104858, -0.05975407, 0.01017047, -0.0063744495, -0.031104859, -0.01671204, 0.045484036, -0.06166402, -0.024856603, -0.027216751, 0.009515631, -0.057298426, 0.04458363, -0.028103514, 0.026889332, -0.01500673, -0.006722333, -0.026575554, -0.04417436, 0.021827972, 0.07274172, 0.024269976, -0.083983116, 0.0009234255, 0.010586566, -0.019808883, -0.007162303, 0.024038054, 0.04281011, -0.0142836785, 0.0070599844, -0.07557935, -0.06444708, 0.04122758, -0.021268629, -0.05866267, 0.02072293, 0.00043272247, -0.015020372, -0.07519736, -0.023014868, -0.034406338, -0.031295855, 0.002385729, 0.014788451, -0.03023174, -0.018321853, -0.03457005, -0.029413192, 0.01698489, 0.0006774345, -0.0032349734, 0.043410376, 0.018512849, 0.02045008, 0.077434726, 0.027053041, -0.018935764, -0.046193443, 0.067503, -0.021364126, 0.012980822, 0.011862138, 0.031486847, 0.029767895, -0.025675151, -0.055006485, 0.040654596, -0.047421265, 0.008819864, 0.003639132, -0.06619332, -0.0160572, 0.028048944, 0.004682782, -0.022346385, 0.019890739, -0.03533403, -0.007980852, -0.05173229, 0.004348541, 0.051132023, 0.017271383, -9.027486e-05, 0.022742018, 0.021405054, -0.003898339, -0.03233268, 0.02034094, 0.024815675, -0.0056309346, 0.020409154, -0.00753065, 0.00081172766, -0.035415884, -0.0044440385, -0.04381965, -0.014529243, -0.03568873, 0.048785515, -0.011616574, -0.019495107, -0.07121375, -0.012482871, 0.03413349, 0.025661508, -0.014870306, 0.045893308, -0.0062107397, -0.03446091, -0.10280974, 0.04556589, -0.0071213758, 0.007646611, -0.020709287, -0.014611098, 0.03222354, 0.02369699, 0.022728374, -0.021336842, 0.023833416, -0.034624618, -0.0404636, -0.02995889, 0.006149349, -0.038717363, -0.0022083768, -0.0054058335, 0.003649364, -0.001132326, 0.027721522, -0.020422796, -0.03969962, 0.04974049, -0.03727126, 0.011295975, 0.020436438, -0.0602452, -0.0075511136, -0.011889423, 0.017271383, -0.006909917, 0.014488316, -0.040654596, -0.005419476, 0.050831888, 0.030913863, -0.0111118015, -0.015306865, 0.04414707, 0.015797993, -0.017257739, -0.033287656, 0.043628655, -0.019754313, 0.0060913684, -0.022346385, 0.022209961, 0.019481463, 0.043683227, 0.018444635, -0.003117307, -0.021909826, 0.0176
|
|||
|
"**Models - OpenAI API**
|
|||
|
**GPT-3.5 Models:**
|
|||
|
. **gpt-3.5-turbo-instruct**
|
|||
|
- **Description:** Similar capabilities to GPT-3 era models. Compatible with legacy Completions endpoint, not Chat Completions.
|
|||
|
- **Context Window:** 4,096 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
. **gpt-3.5-turbo-16k**
|
|||
|
- **Description:** Legacy model pointing to gpt-3.5-turbo-16k-0613.
|
|||
|
- **Context Window:** 16,385 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
. **gpt-3.5-turbo-0613**
|
|||
|
- **Description:** Legacy snapshot of gpt-3.5-turbo from June 13, 2023. Will be deprecated on June 13, 2024.
|
|||
|
- **Context Window:** 4,096 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
. **gpt-3.5-turbo-16k-0613**
|
|||
|
- **Description:** Legacy snapshot of gpt-3.5-turbo-16k-turbo from June 13, 2023. Will be deprecated on June 13, 2024.
|
|||
|
- **Context Window:** 16,385 tokens
|
|||
|
- **Training Data:** Up to September 2021
|
|||
|
**DALL-E:**
|
|||
|
- DALL-E is an AI system that creates realistic images and art from natural language descriptions. DALL-E 3 supports creating new images with specific sizes and editing existing images or creating variations. Available through the Images API and ChatGPT Plus.
|
|||
|
. **dall-e-3**
|
|||
|
- **Description:** The latest DALL-E model released in November 2023.
|
|||
|
. **dall-e-2**
|
|||
|
- **Description:** Released in November 2022, this model offers more realistic, accurate, and higher resolution images than the original.
|
|||
|
**TTS (Text-to-Speech):**
|
|||
|
- TTS converts text to natural-sounding spoken text. Two model variants are offered:
|
|||
|
- **tts-1:** Optimized for real-time text-to-speech use cases.
|
|||
|
- **tts-1-hd:** Optimized for quality.
|
|||
|
- These models can be used with the Speech endpoint in","[-0.012538473, -0.0011864905, 0.062783696, -0.02972179, -0.021684643, -0.024241917, -0.031156996, 0.07473504, 0.01007253, -0.007821867, 0.016948467, -0.04237769, -0.035984505, -0.059808906, -0.056207847, 0.03324457, -0.03634983, -0.01677885, -0.0022343532, 0.050727975, 0.03444492, -0.004289306, -0.03872444, -0.0138693, 0.036950007, 0.012192719, -0.036088884, 0.04198627, -0.0067911292, -0.048353363, 0.027608126, -0.04042059, -0.022219583, -0.017000657, 0.0131843155, 0.019310031, -0.00036450947, 0.04248207, 0.012284051, -0.0045078485, -0.0016928896, -0.03376646, -0.022845855, 0.032957528, -0.021397602, 0.0074304477, 0.019205652, -0.016817993, -0.02141065, 0.005016694, -0.027060138, 0.06977706, -0.020836568, 0.00073350396, -0.038802724, -5.8967762e-05, -0.06701103, -0.01887947, -0.0015509999, -0.06314902, -0.047544427, -0.0055385865, 0.022884997, 0.0043121385, -0.018357577, -0.03060901, -0.015630687, 0.038620062, -0.04438698, -0.0023436246, 0.0039174575, 0.0065562776, -0.07040333, -0.032487825, 0.013960631, 0.020432102, 0.016270006, 0.07671823, 0.015735066, -0.038620062, -0.041960176, -0.003999003, -0.043369286, -0.012114435, -0.0068302713, 0.02315899, -0.044752304, -0.00953759, -0.04650064, -0.010581375, -0.048092417, -0.03974213, -0.025572743, -0.019310031, 0.05375495, -0.007945817, 0.03186155, -0.018240152, -0.020458195, 0.0525546, -0.005496183, -0.014286813, -0.010059482, -0.003139511, 0.039194144, 0.0056984164, 0.012714611, -0.027477652, -0.029669601, -0.016948467, -0.12316669, -0.0030693817, -0.00846771, -0.01469128, -0.0019342649, -0.027503747, 0.014639092, 0.014913085, -0.025651028, -0.0418297, -0.027999545, 0.036088884, 0.049945135, -0.014717375, 0.045952655, 0.008833035, -0.012368858, -0.03494072, -0.021032277, -0.0006160781, -0.009863772, 0.019570978, 0.026720908, -0.03723705, -0.011383785, -0.026681766, -0.034210067, -0.025011709, -0.04681378, 0.027373275, -0.008963508, -0.033192378, -0.017731305, 0.057042874, -0.07290842, -0.02383745, -0.030791672, -0.02422887, -0.016230864, 0.034131784, -0.051302057, 0.014247672, -0.015200126, -0.024489816, -0.052032705, -0.039768226, -0.00010361405, 0.06805481, 0.006719369, -0.0695683, -0.009459306, 0.012362334, -0.01513489, -0.006660656, -0.004612227, 0.018187962, 0.014299861, 0.024620289, -0.0841813, -0.038907103, 0.049110107, 0.019766688, -0.034966815, 0.013856252, -0.01281899, -0.037341427, -0.03961166, -0.0014042177, -0.03984651, -0.03473196, 0.0068824603, 0.019923255, -0.045509048, -0.0071760253, -0.020236392, -0.03473196, 0.02219349, 0.0116186375, -0.01281899, 0.02938256, 0.026316442, 0.012329716, 0.04582218, 0.048536025, 0.0026143563, -0.027425464, 0.02529875, -0.010033388, 0.07186463, 0.003989218, 0.055842523, 0.012655899, -0.042560354, -0.056103468, 0.04389118, -0.04918839, 0.017496454, 0.0037152239, -0.04417822, -0.029643508, 0.050127797, -0.015291457, -0.016570095, -0.003581489, -0.079588644, -0.014808706, -0.072334334, -0.016061248, 0.02569017, 0.03060901, -0.006243142, 0.050675783, 0.021828163, 0.034288354, 0.006784606, -0.0010788501, 0.029800076, -0.018396718, 0.007391306, -0.0038946245, -0.021723785, -0.02758203, -0.023459079, -0.014352051, -0.014091104, -0.030948238, 0.044830587, -0.00063238724, 0.013340883, -0.03483634, 0.0013838313, 0.0025866309, 0.022871949, 0.03444492, 0.052632883, 0.011292454, 0.006817224, -0.10385665, 0.0384374, 0.000545541, 0.035410423, 0.005019956, 0.022597956, -0.0017940063, 0.038907103, -0.009054839, -0.0437868, 0.016570095, -0.048718687, -0.0053200442, 0.0112272175, 0.035932314, -0.010242145, 0.016387433, 0.0028671483, -0.0026714385, 0.016857136, -0.0006226017, -0.0071303593, -0.009446259, 0.0272428, -0.01454776, 0.0131843155, -0.0011587649, -0.0588695, -0.0022066277, -0.018292341, -0.006243142, 0.0016896278, 0.021436743, -0.014678233, -0.014952227, 0.0016374384, 0.027555937, -0.031365752, -0.024007065, 0.021319319, -0.011103268, -0.04169923, -0.020066775, 0.029304277, -0.032566108, -0.00034738486, -0.042403784, 0.029069426, 0.036950007, 0.04154266, 0.015421931, -0.012982082
|
|||
|
"**Models - OpenAI API**
|
|||
|
**Text-to-Speech Models:**
|
|||
|
. **tts-1**: This is a new text-to-speech model optimized for speed, providing efficient conversion of text into spoken words.
|
|||
|
2. **tts-1-hd**: This model is optimized for quality, offering high-definition text-to-speech conversion.
|
|||
|
**Whisper:**
|
|||
|
Whisper is a versatile speech recognition model capable of handling diverse audio inputs. It supports multilingual speech recognition, speech translation, and language identification. The Whisper v2-large model is accessible via the API under the name ""whisper-1."" While the open-source version and the API version are similar, the API offers an optimized inference process for faster performance. More technical details can be found in the associated paper.
|
|||
|
**Embeddings:**
|
|||
|
Embeddings are numerical representations of text, useful for measuring the relatedness between text pieces. They are applied in search, clustering, recommendations, anomaly detection, and classification tasks.
|
|||
|
- **text-embedding-3-large**: The most capable embedding model for both English and non-English tasks, with an output dimension of 3,072.
|
|||
|
- **text-embedding-3-small**: Offers improved performance over the second-generation ada embedding model, with an output dimension of 1,536.
|
|||
|
- **text-embedding-ada-002**: A second-generation embedding model replacing 16 first-generation models, also with an output dimension of 1,536.
|
|||
|
**Moderation:**
|
|||
|
The document mentions a section on moderation, likely related to content moderation capabilities, though specific details are not provided in the visible content.","[0.030271932, 0.004605451, 0.02895232, 0.0015027098, -0.026299896, 0.021549288, -0.020467205, 0.038532715, -0.023753043, 0.007449218, 0.0048726727, -0.033782106, -0.046529572, -0.0030334615, 0.001618176, 0.01970183, -0.004819888, -0.017880762, -0.013354489, 0.03222496, 0.026708977, 0.03602545, -0.03871746, 0.037424237, 0.028398082, -0.0077659255, -0.03444191, 0.021800015, 0.016640326, -0.0419901, 0.03270002, -0.031010916, -0.04695185, -0.021351347, -0.028002199, 0.03151237, -0.024531614, 0.0037411042, 0.018078705, 0.015597831, 0.0030812975, -0.040908016, -0.05943539, 0.03465305, -0.011262901, 0.021061031, -0.0058458876, -0.021179797, -0.05874919, 0.03803126, -0.051544104, 0.05025088, -0.035972662, 0.0029724294, 0.014740082, 0.016270835, -0.03940366, -0.0033666638, -0.020612363, -0.014212237, -0.034732226, -0.0026408765, -0.021694446, -0.009019558, -0.0157034, -0.018514177, 0.004298641, 0.021456916, -0.05479035, -0.01755086, 0.047400516, -0.008993166, -0.045869764, 0.019728221, -0.004875972, -0.02191878, -0.029955225, 0.11063639, -0.012905819, -0.025376167, -0.039139736, 0.019728221, -0.034230772, -0.010015867, -0.008346555, 0.0035530592, -0.023027254, 0.012780457, -0.05848527, -0.023647474, -0.056109965, -0.019860182, -0.035946272, -0.004971644, 0.045421097, -0.025600502, 0.004674731, -0.0024594297, 0.038691066, 0.041330293, 0.0015109575, -0.029005105, -0.024043357, -0.0054368074, 0.028767575, -0.018184274, 0.04294022, -0.028899536, -0.028398082, -0.00024990182, -0.084560834, -0.0014276569, -0.017511271, -0.013526038, -0.0037510013, -0.06819762, -0.0072974623, 0.016402796, -0.044814073, -0.008161809, -0.008273977, 0.022248683, 0.044339012, 0.0040644095, 0.014027491, -0.0194643, -0.009263687, -0.021113815, -0.031037308, 0.008214594, 0.017656429, 0.033782106, 0.06423879, -0.0085049085, -0.045896158, -0.029612126, -0.010134632, 0.024742752, -0.001908491, -0.004090802, 0.022050742, -0.059857666, -0.019741418, 0.029849656, -0.061071713, -0.04650318, -0.024201712, -0.025745658, -0.030641425, 0.0389286, -0.025033068, 0.007224884, -0.009784934, 0.003628937, -0.0508579, -0.04154143, 0.0056710388, 0.042966615, 0.008735841, -0.06318309, -0.021364542, 0.007231482, -0.01304438, 0.020216478, 0.0025633492, 0.03676443, 0.008986568, -6.304247e-05, -0.03964119, -0.07827947, 0.012536328, -0.0045526666, -0.035075326, 0.006202183, 0.0011604351, -0.06772257, -0.017511271, -0.04106637, -0.017564055, -0.024228103, -0.01935873, 0.033280652, -0.055107057, 0.014502552, -0.029400988, -0.025349775, 0.0018623045, 0.053972192, -0.010194014, 0.017326524, -0.0054631997, 0.035471212, 0.057060085, 0.03280559, 0.022829313, 0.0063407426, -0.01587495, -0.014185845, 0.054843135, -0.011929306, 0.056321103, 0.0136184115, -0.018936453, -0.031591546, 0.011856727, -0.027421568, 0.0031456286, 0.026115151, -0.051359355, -0.006353939, 0.023225198, 0.00088001724, 0.041462254, 0.001338583, -0.08572209, 0.020256067, -0.08287173, 0.0061032125, 0.0070533343, 0.05391941, -0.01942471, 0.06260246, 0.040221818, 0.02987605, -0.010867017, 0.022578586, -0.008333359, -0.025204618, 0.019807398, -0.020374833, 0.018566962, -0.0062615657, -0.0361838, -0.0025072657, 0.015848558, -0.018435, 0.030878955, 0.020454008, 0.013684392, -0.062180188, -0.005786505, -0.021549288, 0.019675437, 0.026788153, 0.053681877, 0.006650852, -0.0038499723, -0.09195067, 0.055529334, 0.015043594, 0.03776734, -0.010279789, 0.04602812, 0.005809598, 0.012034875, -0.012787054, -0.04547388, 0.0141066685, -0.032172177, 0.028239729, -0.020823501, 0.030456679, -0.02608876, -0.00012814684, -0.005083811, -0.053365167, -0.0054203123, 0.0039786347, 0.010167622, -0.03151237, -0.024729557, -0.011737962, 0.013710784, -0.017154975, -0.04396952, 0.0018078705, -0.02051999, -0.030535856, -0.009488021, 0.022459822, 0.030562248, -0.015017201, 0.0110319685, 0.04616008, -0.0092175, -0.033676535, 0.0076669543, -0.006344042, -0.047532476, -0.014357395, 0.027342392, -0.0
|
|||
|
"**Moderation Models and GPT Base**
|
|||
|
**Moderation Models**
|
|||
|
The moderation models are designed to ensure content compliance with OpenAI's usage policies. They classify content into categories such as hate, hate/threatening, self-harm, sexual, sexual/minors, violence, and violence/graphic. These models process inputs by breaking them into chunks of 4,096 tokens. If the input exceeds 32,768 tokens, some tokens may be truncated, potentially omitting a few from the moderation check.
|
|||
|
The moderation endpoint provides the maximum score per category from each request. For instance, if one chunk scores 0.9901 and another scores 0.1901 in a category, the API response will show 0.9901.
|
|||
|
- **text-moderation-latest**: Points to text-moderation-007 with a max of 32,768 tokens.
|
|||
|
- **text-moderation-stable**: Also points to text-moderation-007 with a max of 32,768 tokens.
|
|||
|
- **text-moderation-007**: The most capable model across all categories with a max of 32,768 tokens.
|
|||
|
**GPT Base**
|
|||
|
GPT base models are capable of understanding and generating natural language or code but are not trained for instruction following. They serve as replacements for the original GPT-3 base models and utilize the legacy Completions API. Most users are advised to use GPT-3.5 or GPT-4.
|
|||
|
- **babbage-002**: Replaces the GPT-3 ada and babbage models, with a max of 16,384 tokens and training data up to September 2021.
|
|||
|
- **davinci-002**: Replaces the GPT-3 curie and davinci models, with a max of 16,384 tokens and training data up to September 2021.","[-0.011677172, 0.037120968, 0.0661357, -0.030608026, -0.02475197, -0.02385749, -0.02932221, 0.050622042, 0.026429122, 0.0139553035, 0.0133822765, -0.009126503, -0.061160147, -0.038294975, -0.044165008, -0.023577964, 0.017805764, -0.008595405, -0.025702357, 0.042292185, 0.028958827, 0.010069901, -0.020880545, 0.008958788, 0.028287966, 0.011194991, -0.033543043, 0.0057791867, 0.0024144002, -0.032983992, 0.055821214, -0.014842796, -0.039832365, 0.006792466, 0.009196384, -0.014465437, -0.0019374602, 0.053529106, 0.025590546, 0.024067134, -0.019119535, -0.0267366, -0.04136975, 0.0070684976, -0.021914788, 0.021663215, 0.013731684, -0.009790376, -0.037847735, 0.012145377, -0.041621327, 0.047351595, 0.0019357131, -0.001330366, 0.0018099267, 0.012047543, -0.05797356, -0.01438158, -0.015946921, -0.025478736, -0.04489177, -0.0275612, 0.008490583, -0.019343155, -0.030216692, -0.017079, -0.029014733, 0.03541586, -0.02575826, 0.006865842, 0.015499681, -0.0004029096, -0.016673688, -0.031250935, -0.015331966, -0.016114637, 0.04489177, 0.053696822, -0.0050838673, -0.035639483, -0.009426992, 0.011656207, -0.03287218, -0.018602412, -0.009790376, 0.016995141, -0.028413752, -0.009804352, -0.059147567, -0.04036346, -0.067980565, -0.014018197, -0.041984707, 0.056743648, 0.049112607, -0.033487137, -0.01714888, -0.029825356, 0.0025803684, 0.04452839, -0.024388587, 0.00025135445, 0.009902186, 0.0139553035, 0.014926654, -0.008064306, -0.0031079727, 0.0017260691, -0.072061636, -0.016324282, -0.084081225, 0.007037051, -0.046065778, -0.007728876, 0.008232022, -0.054116108, -0.024206895, 0.04234809, 0.00044330975, -0.021369714, -0.0047763893, 0.041928805, 0.037093014, -0.048190173, -0.0071069323, 0.015849087, 0.010041948, -0.021313809, -0.010027972, -0.015499681, -0.0036233475, 0.019021701, 0.0468205, -0.008099247, -0.03935717, -0.007099944, -0.00034351044, -0.009447957, -0.039608743, -0.0153179895, -0.00992315, -0.040559128, -0.02299096, 0.074018314, -0.08368989, -0.034437522, -0.068092376, -0.0007813607, -0.03759616, 0.05942709, -0.029182447, 0.006837889, -0.001149548, -0.010726785, -0.018322887, -0.056520026, 0.01670164, 0.047155928, -0.0028459176, -0.063955404, -0.01385747, 0.011768018, 0.025101377, -0.007791769, 0.038183164, 0.061160147, -0.00076258014, -0.0047449428, -0.07569547, -0.053976346, 0.051013377, 0.012676475, -0.03658987, -0.018881937, -0.022739388, -0.036897346, -0.09856064, -0.022976985, -0.013885422, -0.019902205, -0.024849804, 0.0033717747, -0.07642223, 0.033095803, -0.04355005, -0.022264196, 0.002606574, 0.029517878, -0.008469618, -0.020097874, 0.036198534, 0.021271879, 0.066023886, 0.046009872, 0.022739388, -0.0534732, 0.03186589, -0.0021698156, 0.06373178, 0.017428406, 0.021467548, 0.039301265, -0.024807876, -0.042991, 0.0032197826, -0.032005653, 0.0047169905, -0.0025908507, -0.04441658, 0.0044759, 0.033570994, 0.008294915, -0.0005289144, 0.0008861827, -0.05232715, -0.004122999, -0.05741451, -0.0028773642, 0.008057319, 0.034772955, -0.0120195905, 0.04617759, 0.013584932, 0.03614263, -0.0074773035, 0.01314468, 0.026429122, 0.014507366, 0.034493428, 0.025967905, 0.020069921, -0.011474516, -0.027099984, -0.036785536, 0.010475213, 0.0018763139, 0.029629689, -0.018770128, -0.010020984, -0.063787684, 0.0024109061, 0.019580752, 0.010880524, -0.0049895276, 0.0385745, 0.0021663215, -0.025939953, -0.085143425, 0.031278886, 0.037847735, 0.03485681, -0.01097137, 0.006376672, -0.011097156, 0.0040356475, -0.015499681, -0.0065513756, 0.037568208, -0.02236203, -0.028679302, -0.0021278867, 0.04774293, -0.043018952, -0.0038819085, -0.0037666042, -0.0009433981, -0.017176833, -0.015960898, -0.004423489, -0.056520026, 0.02711396, -0.0050419387, 0.0151642505, -0.0054367683, -0.03276037, -0.0050733853, -0.0034259327, 0.004741449, -0.03538791, -0.0136897545, -0.014136995, -0.010803655, 0.06082472, 0.036478058, 0.014968582, -0.008860954, 0.010398343, 0.023787608, 0.01482882, -0.008252986, 0.03879812, -0.020531138, 0.0221
|
|||
|
"Your Data is Your Data
|
|||
|
As of March 1, 2023, data sent to the OpenAI API is not used to train or improve OpenAI models unless you explicitly opt in. Opting in can help models improve for your specific use case over time.
|
|||
|
To prevent abuse, API data may be retained for up to 30 days before deletion, unless legally required otherwise. Trusted customers with sensitive applications may have zero data retention, meaning request and response bodies are not logged and exist only in memory to serve the request.
|
|||
|
This data policy does not apply to OpenAI's non-API consumer services like ChatGPT or DALL-E Labs.
|
|||
|
**Default Usage Policies by Endpoint**
|
|||
|
- **/v1/chat/completions**: Data is not used for training. Default retention is 30 days, and it is eligible for zero retention except for image inputs.
|
|||
|
- **/v1/files**: Data is not used for training. Retention is until deleted by the customer, with no zero retention option.
|
|||
|
- **/v1/assistants**: Data is not used for training. Retention is until deleted by the customer, with no zero retention option.
|
|||
|
- **/v1/threads**: Data is not used for training. Retention is 60 days, with no zero retention option.
|
|||
|
- **/v1/threads/messages**: Data is not used for training. Retention is 60 days, with no zero retention option.
|
|||
|
- **/v1/threads/runs**: Data is not used for training. Retention is 60 days, with no zero retention option.
|
|||
|
- **/v1/threads/runs/steps**: Data is not used for training. Retention is 60 days, with no zero retention option.
|
|||
|
- **/v1/images/generations**: Data is not used for training. Retention is 30 days, with no zero retention option.
|
|||
|
- **/v1/images/edits**: Data is not used for training. Retention is 30 days, with no zero retention option.
|
|||
|
- **/v1/images/variations**: Data is not used for training. Retention is 30 days, with no zero retention option.
|
|||
|
- **/v1/embeddings**: Data is not used for training. Retention is 30 days, and it is eligible for zero retention.
|
|||
|
- **/v1/audio/transcriptions**: Data is not used for training","[0.003520505, 0.027351111, 0.052027427, -0.016691258, 0.014475373, -0.028452499, -0.032386024, 0.022945562, 0.0051332503, 0.0032992442, 0.040331744, -0.05297147, -0.0018798972, -0.01082375, -0.014855613, 0.020047866, -0.023391362, -0.0057986714, -0.05071625, 0.04006951, 0.031101072, 0.05926511, -0.030550377, 0.011131876, 0.016809264, -0.022067076, 0.024256738, 0.0010218971, 0.013505103, -0.036660455, -0.0075917034, -0.019012038, -0.05999937, -0.0117940195, 0.024256738, 0.018238444, 0.013701779, 0.006877113, 0.020296989, -0.026839754, 0.00294031, -0.07274399, -0.008122729, 0.03920413, -0.034274116, 0.024217403, -0.0019257884, -0.007191795, -0.017464852, 0.012423383, -0.065558754, 0.035401724, -0.04953619, -0.023863385, -0.016665034, -0.0019290663, 0.0018553126, 0.009355234, -0.01319042, -0.006024849, 0.0030304533, -0.040121954, 0.019602066, -0.0021208257, 0.013767337, -0.00092191994, -0.029763673, 0.07945721, -0.007945721, 0.024073174, 0.0152489655, -0.031599317, -0.043058988, -0.00068795716, 0.010535291, 0.0081030615, 0.009119222, 0.06440492, -0.00173239, -0.056380525, -0.00013367839, 0.014868725, -0.034221668, 0.003828631, -0.01385912, 0.02441408, -0.057324573, -0.017491074, -0.007093457, 0.020572336, -0.053233705, -0.028347604, -0.0691776, -0.0053889295, 0.038469873, -0.0031386253, 0.038837004, 0.019143155, 0.009197893, -0.0012054616, -0.044842187, -0.03597864, -0.01603567, 0.02997346, -0.011558007, -0.009958374, 0.008758649, -0.011623567, -0.019588955, -0.018513791, -0.07054122, -0.030261919, -0.03624088, -0.009827257, -0.05205365, -0.0033762758, -0.0743174, 0.037132476, 0.019877413, -0.013419877, -0.017661527, 0.045235537, 0.028032921, -0.016140565, 0.018513791, -0.010974535, -0.01145967, -0.02082146, -0.017871315, -0.05664276, 0.04741209, 0.0071065687, 0.062831506, -0.055856057, -0.047674324, -0.042718083, 0.012121813, -0.004133479, -0.039833497, -0.020887017, 0.02795425, -0.015235853, -0.031179743, 0.049247734, -0.07589081, -0.014619602, -0.050532684, -0.006732884, 0.044212822, 0.04583868, -0.023063568, 0.04893305, 0.035401724, 0.04256074, 0.0062280814, -0.00041240553, 0.045366656, 0.06839089, -0.00966336, -0.04300654, -0.023810938, 0.053233705, -0.026053047, 0.0050676917, -0.013118306, 0.01926116, -0.013439544, -0.06891536, -0.059527345, -0.0511096, 0.042010047, 0.014750719, -0.027377335, -0.030445484, -0.038758334, -0.03616221, -9.403584e-05, 0.02472876, 0.034955926, -0.04143313, -0.025371237, -0.013806673, -0.0716426, -0.0007760517, -0.04814635, -0.031730436, -0.016442135, 0.024453415, -0.028557392, 0.047831666, 0.016507693, -0.02598749, 0.052447002, 0.03424789, 0.006916448, -0.030078355, 0.0021650777, -0.023692932, 0.0031746826, -0.024060061, 0.032097563, 0.0119120255, -0.0010243555, -0.031363305, 0.020034755, -0.03828631, 0.008063726, -0.00030279948, -0.07730688, -0.00094240706, 0.01708461, 0.023614261, -0.03521816, 0.020585448, -0.06188746, -0.036529336, -0.05370573, 0.011217102, 0.026039936, 0.019208714, -0.0045399433, 0.033670973, 0.05071625, 0.025935043, -0.020742789, 0.0019880692, -0.0077359327, -0.035454173, -0.014147579, -0.012436495, -0.005946179, 0.031022402, -0.037578277, -0.019956084, 0.02196218, -0.068967804, 0.028111592, -0.018251557, 0.00745403, -0.005497101, -0.0017995877, -0.012974077, -0.020913241, 0.033985656, 0.0038679664, 0.015957, -0.021241035, -0.066240564, 0.048382357, 0.0129806325, -0.0039499146, -0.021804841, 0.014842501, -0.060051817, -0.015576759, -0.03348741, 0.0031845164, 0.034903478, -0.0152489655, 0.013046191, 0.06178257, 0.010227165, -0.0004896419, 0.011092541, 0.015589871, 0.024099397, 0.008509526, -0.012987189, 0.0016471636, -0.019667625, -0.01954962, 0.003946637, 0.043767024, -0.008824208, -0.033670973, 0.044081703, 0.030996177, -0.02562036, -0.054807115, 0.014645825, -0.04090866, 0.013321538, 0.0031894331, 0.017740197, 0.025961265, -0.012233263, -0.011577675, 0.02569903, -0.039649934, 0.00048431527, -0.010345171, 0.0016086479, 0.03595242, -0.018920256, 0.021057472, 0.003772906, 0.069544725, 0.011826798, -0.0256
|
|||
|
"### Model Endpoint Compatibility and Data Retention
|
|||
|
#### Data Retention Details
|
|||
|
The table outlines the data retention policies for various API endpoints:
|
|||
|
- **/v1/audio/translations**: No data is used for training, and there is zero data retention.
|
|||
|
- **/v1/audio/speech**: No data is used for training, with a default retention period of 30 days. It is not eligible for zero retention.
|
|||
|
- **/v1/fine_tuning/jobs**: No data is used for training, and data is retained until deleted by the customer. It is not eligible for zero retention.
|
|||
|
- **/v1/moderations**: No data is used for training, and there is zero data retention.
|
|||
|
- **/v1/completions**: No data is used for training, with a default retention period of 30 days. It is eligible for zero retention.
|
|||
|
Additional notes:
|
|||
|
- Image inputs via the `gpt-4-vision-preview` model are not eligible for zero retention.
|
|||
|
- The default retention period for the Assistants API is still being evaluated during the Beta phase.
|
|||
|
#### Model Endpoint Compatibility
|
|||
|
The table provides information on the compatibility of endpoints with the latest models:
|
|||
|
- **/v1/assistants**: Supports all models except `gpt-3.5-turbo-0301`. The `retrieval` tool requires `gpt-4-turbo-preview` or `gpt-3.5-turbo-1106`.
|
|||
|
- **/v1/audio/transcriptions**: Compatible with `whisper-1`.
|
|||
|
- **/v1/audio/translations**: Compatible with `whisper-1`.
|
|||
|
- **/v1/audio/speech**: Compatible with `tts-1` and `tts-1-hd`.
|
|||
|
- **/v1/chat/completions**: Compatible with `gpt-4`, `gpt-4-turbo-preview`, `gpt-4-vision-preview`, `gpt-4-32k`, and `gpt-3.5-turbo`.
|
|||
|
For more details, users are encouraged to refer to the API data usage policies or contact the sales team for information on zero retention.","[-0.012142332, 0.0153577905, 0.0773238, -0.024399275, -0.057305187, 0.00032512736, -0.00070437626, 0.04092864, 0.030919332, -0.010448646, 0.007277759, -0.05323015, -0.029544007, -0.01561248, -0.049435277, 0.028194152, -0.047295883, 0.016758583, -0.038560025, 0.019636577, 0.023571534, 0.04110692, -0.033033255, 0.001708013, 0.027073517, -0.024895921, -0.015281383, 0.020336974, 0.01314199, -0.040750355, 0.008296518, -0.02120292, -0.050454035, -0.009831023, 0.009162463, 0.010639663, 0.02191605, -0.011677524, -0.002809546, -0.019547436, 0.0016140961, -0.011276388, -0.014326297, 0.049537152, -0.05256796, 0.028932752, 0.012390655, -0.001892663, -0.039069403, -0.001959519, -0.03277857, 0.04762698, -0.01159475, -0.0043870304, 0.012256943, -0.018541412, 0.027481021, -0.016223736, 0.014211686, -0.005536318, -0.008767693, -0.030053386, 0.0073477984, -0.027481021, -0.006711074, -0.017420776, 0.0031326837, 0.06565901, -0.017178822, -0.010480482, 0.026462262, -0.019063525, -0.051141698, -0.02827056, 0.0036898174, 0.019878533, 0.023291375, 0.058527697, -0.004399765, -0.06530245, -0.045487586, -0.017051477, -0.038942058, -0.010410442, -0.012709017, 0.06372337, -0.03565656, -0.025430769, -0.033873733, 0.023240438, -0.023495127, 0.00065503013, -0.037541267, -2.6812062e-05, 0.05873145, -0.05149826, 0.0072140866, -0.01512857, -0.0066219326, -0.008009992, 0.013816917, -0.0023956753, -0.01981486, -0.018617818, 0.02307489, -0.039120343, 0.011550179, -0.03440858, -0.044392418, 0.023342313, -0.09336925, -0.009952001, -0.00916883, -0.0149757555, -0.01720429, -0.016121859, -0.07177156, -0.018108439, -0.028041339, -0.0058323946, -0.00034721373, 0.046633687, 0.047907136, -0.02591468, 0.026233042, 0.018159376, 0.0031056227, -0.0139697315, -0.03942597, -0.046710096, 0.027277268, -0.0051702014, 0.064640254, -0.03993535, -0.033899203, -0.011569281, -0.011811236, -0.011454671, -0.054401726, -0.014084342, 0.0067683794, -0.032804035, -0.03565656, 0.012518, -0.07925944, -0.011250919, -0.008054563, 0.0061889603, -0.009773718, 0.05445266, -0.018668756, 0.012970074, 0.0008126194, 0.016643973, -0.04041926, 0.037490327, 0.01711515, 0.06469119, -0.017790077, -0.06560807, 0.017751874, 0.025723662, 0.018133909, -0.0133839445, -0.02143214, 0.009136993, -0.011142676, -0.015332322, -0.06112553, -0.0644365, 0.03835627, 0.0014254665, -0.036369693, -0.020120488, -0.0015154039, -0.027328208, 0.012320615, -0.032854974, 0.0022110252, -0.028856346, 0.008194642, -0.00045207425, -0.021725032, 0.044341482, -0.035758436, -0.033033255, -0.044392418, 0.024895921, -0.039043933, -0.0029639516, 0.024603028, 0.0023144928, 0.06861341, 0.07411471, 0.006736543, -0.014389969, -0.0022571876, -0.01972572, 0.03817799, -0.0379233, 0.029161973, 0.0069339275, 0.015268649, -0.031556055, 0.031810746, -0.026334917, -0.0024688984, 0.039247688, -0.057458002, -0.03219278, 0.029824167, 0.01782828, 0.0063736103, 0.007838076, -0.06800216, 0.0005205221, -0.057559878, 0.0031979477, 0.026564138, 0.007914484, -0.021164715, 0.013078317, 0.060361464, 0.0272518, -0.011906745, 0.03990988, 0.03196356, -0.056897685, -0.0018496842, 0.0055044815, 0.0032695793, -0.037592202, -0.030741049, 0.012072293, 0.0067874813, -0.060259588, 0.034052014, -0.0025516727, 0.005402606, -0.023940833, -0.03099574, 0.009550865, 0.0063545085, 0.0072204536, 0.034561396, 0.018796101, -0.019394623, -0.102028705, 0.08267228, -0.02390263, 0.026385855, -0.006895724, 0.03542734, 0.0041991966, 0.012518, -0.014122545, -0.024475683, 0.025710927, -0.048900425, 0.02750649, 0.018847039, 0.003969976, -0.02580007, -0.0069976, -0.009633639, 0.02492139, 0.010397708, 0.007774404, -0.016796786, -0.030129794, -0.010002939, -0.009429887, 0.046175245, -0.0128873, -0.01196405, 0.02923838, -0.013447617, -0.021890583, -0.025214283, 0.011314591, -0.051676545, -0.017446246, -0.041769113, -0.016007248, 0.016019983, 0.0043615615, 0.005256159, 0.03193809, -0.042049274, 0.0045271097, 0.020922761, 0.026080228, 0.010327668, -0.03
|
|||
|
"LATEST MODELS
|
|||
|
This document outlines the latest models available for different endpoints in the OpenAI API:
|
|||
|
. **/v1/completions (Legacy)**:
|
|||
|
- Models: `gpt-3.5-turbo-instruct`, `babbage-002`, `davinci-002`
|
|||
|
- These models are used for generating text completions based on input prompts.
|
|||
|
. **/v1/embeddings**:
|
|||
|
- Models: `text-embedding-3-small`, `text-embedding-3-large`, `text-embedding-ada-002`
|
|||
|
- These models are designed to convert text into numerical vectors, which can be used for various tasks like similarity comparison and clustering.
|
|||
|
. **/v1/fine_tuning/jobs**:
|
|||
|
- Models: `gpt-3.5-turbo`, `babbage-002`, `davinci-002`
|
|||
|
- These models support fine-tuning, allowing users to customize the models for specific tasks by training them on additional data.
|
|||
|
. **/v1/moderations**:
|
|||
|
- Models: `text-moderation-stable`
|
|||
|
- This model is used for content moderation, helping to identify and filter out inappropriate or harmful content.
|
|||
|
Additionally, the document mentions the availability of `gpt-3.5-turbo-16k` and other fine-tuned versions of `gpt-3.5-turbo`, indicating enhancements in model capabilities and performance.","[-0.0055543836, 0.042311978, 0.088920094, -0.06659016, -0.038590323, -0.006025835, -0.00044959597, 0.056149542, 0.017496778, 0.022117624, 0.013400458, -0.03706669, -0.052153133, -0.055400215, -0.012320179, 0.0058072815, -0.014124807, -0.0015009949, -0.020069465, 0.032820508, 0.03729149, 0.0025149274, -0.023903519, 0.008436169, 0.021118522, -0.0021621196, -0.04870623, 0.051503718, 0.0021995858, -0.034868665, 0.025264796, -0.011858094, -0.03809077, 0.011389765, -0.011570852, 0.013762632, 0.027075669, 0.041962292, 0.008592279, 0.0073996005, 0.006700229, -0.0076056654, -0.041737493, 0.04208718, -0.03431916, -0.0033813363, 0.031471718, -0.012582443, -0.06649025, 0.021493185, -0.04658314, 0.05769815, -0.016884826, 0.006072668, -0.007955351, -0.0007122506, -0.037915926, -0.044360135, 0.011845605, -0.04655816, -0.03991413, -0.015973145, 0.017122114, 0.005838503, -0.01062795, -0.0210311, -0.044984575, 0.05105412, -0.057148643, 0.015473595, 0.029998044, -0.009478982, -0.06678998, -0.00237599, 0.018046282, -0.0029333015, 0.00048433038, 0.08012799, -0.0033875809, -0.009085585, -0.044460047, -0.0058260146, -0.027924906, -0.0060476903, -0.010222064, 0.016834872, -0.028424457, 0.005838503, -0.06434218, -0.021480696, -0.045883767, -0.012064159, -0.0078117303, 0.021193454, 0.058197703, 0.00024392143, 0.0020481595, -0.027000736, -0.00505171, 0.0704367, -0.0016282243, -0.012988328, 0.015286263, -0.011714473, 0.027225534, 0.0055824835, 0.03277055, -0.010384418, -0.044035427, -0.001094329, -0.08817077, -0.04133785, -0.029173784, 0.00919174, -0.015123909, -0.023191659, -0.030697415, -0.009978533, -0.016709983, -0.031421762, 0.00040861717, 0.04016391, 0.031072078, -0.015486084, -0.0123514, 0.027200557, 0.014611869, -0.01818366, -0.019070363, -0.0074370666, -0.03584279, 0.008798343, 0.05220309, -0.04453498, -0.034993555, -0.0347188, -0.060095996, -0.005342074, -0.04053857, 0.023091748, -0.009235451, -0.033469923, -0.028973963, 0.016610073, -0.0870218, -0.021480696, -0.023428947, -0.031546652, -0.045259327, 0.028449435, -0.056499228, 0.018333524, -0.0019060996, -0.015298752, -0.044085383, -0.0058260146, 0.006041446, 0.05505053, 0.020044487, -0.058347568, 0.005317097, 0.011982982, -0.0043991716, 0.0028240248, 0.026601095, 0.021205943, 0.017009715, 0.010821525, -0.06444209, -0.03636732, 0.08032782, 0.018096238, -0.044510003, -0.013462902, 0.0125324875, -0.015336218, -0.063393034, -0.005913436, -0.047807038, -0.013288059, -0.016272876, 0.01266362, -0.058947027, 0.039589424, -0.021430742, -0.03164656, -0.004452249, 0.016959758, -0.016972248, -0.0020996756, 0.01888303, 0.013025794, 0.013550323, 0.044035427, 0.007312179, 0.0015017755, 0.004714513, -0.038365524, 0.074383155, -0.013288059, 0.04738242, 0.01920774, -0.018845566, -0.030272797, 0.007056159, -0.024015918, -0.035043508, 0.022317445, -0.016510163, -0.057448376, 0.031746473, 0.024178272, -0.008923232, 0.0042336956, -0.040888257, -0.01795886, -0.05270264, -0.008985675, 0.014861645, 0.019944577, 0.005576239, 0.027650153, 0.023466412, 0.0408383, -0.0058104037, 0.011196189, 0.012900907, -0.042736594, 0.03217109, 0.011102523, -0.011352299, -0.015873237, -0.029448537, -0.003487491, 0.00045623063, -0.0072122687, 0.022841973, -0.00510791, -0.0032033713, -0.065690964, -0.0033438702, -0.01398743, -0.0012153141, 0.013712677, 0.045184396, -0.0015985635, -0.008429925, -0.09451506, 0.03829059, 0.023965964, 0.05485071, -0.009135541, 0.023828587, -0.027225534, 0.025651949, -0.0054076407, -0.038465433, 0.025926702, -0.04218709, 0.005944658, -0.019257694, 0.062943436, -0.027075669, 0.006850094, -0.027450332, 0.012632398, -0.0059821242, 0.0023572566, 0.0026804039, -0.022192556, 0.031321853, 0.0042336956, 0.0036904337, -0.009135541, -0.060295817, 0.009160518, -0.0111837, -0.0015712443, -0.013138194, -0.014187251, -0.0013784488, -0.007424578, 0.023241615, 0.021892827, 0.00063848874, -0.018745655, 0.008186393, 0.014886622, -0.0
|
|||
|
"Overview
|
|||
|
Evaluation is the process of validatingand testing the outputs that your LLMapplications are producing. Havingstrong evaluations (“evals”) will mean amore stable, reliable application which isresilient to code and model changes.
|
|||
|
Example use cases
|
|||
|
- Quantify a solution’s reliability
|
|||
|
- Monitor application performance in
|
|||
|
production
|
|||
|
Test for regressions
|
|||
|
-
|
|||
|
What we’ll cover
|
|||
|
● What are evals
|
|||
|
● Technical patterns
|
|||
|
● Example framework
|
|||
|
● Best practices
|
|||
|
● Resources
|
|||
|
","[-0.003269481, 0.046420965, 0.03720726, -0.0177603, 0.023072027, 0.008565474, 0.010824846, -0.0117248185, 0.031492747, 0.057447206, 0.024393665, -0.030183697, -0.030611657, -0.0036942933, -0.024846798, 0.026860721, 0.014172995, 0.008112341, -0.00703615, 0.060820527, 0.02352516, -0.0012783703, 0.046018183, 0.011756286, 0.007816546, -0.062482018, 0.008162689, 0.051002644, 0.004232389, -0.031140313, 0.04954255, -0.014185583, -0.01108288, 0.005292846, -0.0022688122, 0.014210757, 0.009585023, 0.0011894744, 0.031618617, 0.03224797, 0.017042838, 0.024431426, -0.008055699, 0.04068128, 0.008980846, -0.0020721399, -0.0122534735, -0.039875712, -0.016602293, 0.04979429, 0.0030224605, -0.012631085, 0.045061566, -0.048485238, 0.00015664952, -0.012536682, -0.03156827, 0.0009172798, -0.0017731979, 0.008798334, 0.020529445, -0.003738348, 0.016551943, -0.018490346, -0.032852147, -0.036905173, -0.0502726, -0.0118569825, 0.0020925938, -0.019497309, 0.06847344, -7.928354e-07, 0.009251467, 0.034765378, 0.0010525904, 0.008678758, 0.057145115, 0.05840382, 0.008483659, -0.032701105, 0.010340245, -0.011139521, -0.0003833144, -0.014751999, 0.03597373, 0.013090511, -0.06520081, -0.026256545, -0.006878812, 0.00013816232, -0.041763764, 0.036426865, 0.0108689, 0.06439525, 0.027867684, 0.04136098, -0.0121213095, -0.015016327, 0.034488462, 0.053217962, -0.030158523, 0.009062662, 0.027641118, -0.023588095, 0.062985495, -0.0200889, -0.022694414, 0.0107996715, -0.021335015, -0.014751999, -0.07607601, -0.010396887, -0.045036394, -0.0071053784, 0.027313855, 0.018301541, 0.0067907027, -0.04717619, -0.007973883, -0.06993354, -0.0122283, 0.020831535, -0.0020044844, -0.030989267, 0.026608981, -0.03204658, 0.028497037, 0.02796838, 0.0056893374, 0.0006855998, 0.027137637, 0.019849746, 0.050952297, -0.04569092, -0.021498647, 0.013757624, -0.007476696, 0.0067655286, -0.014903043, -0.005815208, 0.049592897, 0.0073193577, -0.012555562, 0.02957952, -0.0018282661, -0.013820559, -0.027389377, 0.03607443, 0.029529173, -0.0022389179, 0.01419817, 0.02068049, -0.07607601, 0.012637378, -0.013682102, -0.049970508, -0.043249033, -0.004191481, 0.04780554, -0.059561826, 0.03038509, 0.04644614, -0.021045513, 0.01525548, -0.0018565869, -0.018062389, -0.012964641, -0.002367935, -0.035445075, 0.020919643, -0.027263507, -0.03894427, 0.012643672, -0.0034047917, 0.027187984, -0.020365814, -0.0061644977, -0.0224175, -0.030913746, -0.014147822, -0.047629323, 0.012801009, -0.05407388, -0.017193884, -0.03834009, -0.0049246754, 0.0037352012, 0.013115685, -0.06364002, -0.04141133, -0.012599617, 0.026029978, 0.01928333, 0.023034265, 0.020667903, 0.0060575083, 0.019673528, 0.035319205, -0.032348666, 0.031392053, 0.014739412, 0.009289228, 0.058202427, 0.0036659725, 0.046219572, 0.030863397, 0.006916573, 0.0007438148, -0.049265634, -0.01453802, 0.012366757, 0.001281517, 0.03670378, 0.027565595, -0.012964641, 0.034891248, 0.0022326245, 0.050197076, 0.04030367, 0.047906235, -0.025954455, -0.046370618, 0.042367943, -0.02533769, -0.046974797, 0.028497037, 0.03534438, -0.046018183, 0.02055462, -0.10140111, 0.0078039584, 0.002405696, -0.044130128, 0.0021854232, -0.03607443, -0.037484176, 0.012222006, 0.020428749, -0.003173505, -0.021473473, 0.020869296, 0.03237384, -0.036779303, 0.0018676006, 0.019421788, 0.062431667, 0.0072123683, -0.045841962, 0.049366333, 0.026281718, 0.019182634, -0.031241009, 0.017068014, -0.021070689, 0.035873037, -0.051858563, -0.022983916, -0.028320817, 0.03292767, -0.041134413, -0.036376517, 0.005752273, -0.021674866, 0.017156122, -0.007955003, 0.035369553, -0.0021618223, -0.001757464, -0.01589742, -0.052815177, 0.0102710165, -0.021095863, -0.0013593993, 0.030158523, 0.020604968, -0.017042838, 0.03602408, 0.015117023, 0.012744368, -0.029252257, -0.038667355, -0.034136027, 0.01953507, -0.0025347131, 0.008754279, -0.0032002523, 0.0025488737, -0.010252136, -0.037005868, 0.04093302, 0.027741814, -0.011573774, 0.056641635, -0.016728163, 0.026986592, 0.03141723, 0.03929671, -0.01792393, -0.02132243, 0.013266729, 0.011812927, 0.065956034, -0.011202456, -0.024305554, -0.014059712,
|
|||
|
"What are evals
|
|||
|
Example
|
|||
|
An evaluation contains a question and a correct answer. We call this the ground truth.
|
|||
|
Question
|
|||
|
What is the populationof Canada?
|
|||
|
Thought: I don’t know. Ishould use a tool
|
|||
|
Action: Search
|
|||
|
Action Input: What is thepopulation of Canada?
|
|||
|
LLM
|
|||
|
Search
|
|||
|
There are 39,566,248 peoplein Canada as of 2023.
|
|||
|
The current population ofCanada is 39,566,248 as ofTuesday, May 23, 2023….
|
|||
|
Actual result
|
|||
|
|
|||
|
An evaluation, or ""eval,"" involves a question and a correct answer, known as the ground truth. In this example, the question posed is, ""What is the population of Canada?""
|
|||
|
The process begins with a person asking this question. The language model (LLM) initially does not know the answer and decides to use a tool to find it. The LLM takes the action of searching, with the input being the question about Canada's population.
|
|||
|
The search tool then provides the answer: ""The current population of Canada is 39,566,248 as of Tuesday, May 23, 2023."" This result matches the actual result expected, which is that there are 39,566,248 people in Canada as of 2023.
|
|||
|
This example illustrates how evaluations are used to verify the accuracy of information provided by a language model.
|
|||
|
an example of an evaluation process, often referred to as ""evals."" The purpose of evals is to compare a predicted answer to a known correct answer, called the ""ground truth,"" to determine if they match.
|
|||
|
In this example, the question posed is: ""What is the population of Canada?"" The ground truth states that the population of Canada in 2023 is 39,566,248 people. The predicted answer is: ""There are 39,566,248 people in Canada as of 2023.""
|
|||
|
Since the predicted answer matches the ground truth, the evaluation is successful, as indicated by a checkmark. This process is crucial for verifying the accuracy of predictions in various applications.","[-0.008153741, 0.009537966, 0.042528648, -0.002084576, 0.00020238104, 0.013644498, -0.005553377, -0.0056489543, 0.0031738288, 0.05547444, 0.045877155, -0.037123583, -0.012530527, -0.034249667, -0.02188393, 0.014435483, 0.012998527, -0.029978346, -0.040155694, 0.02146207, 0.0110408375, 0.036965385, 0.014936441, 0.013960892, 0.006041151, -0.04548166, -0.013644498, 0.058005597, -0.017388497, -0.012998527, 0.010737627, -0.001666013, -0.07551274, -0.008351487, -0.026682574, -0.005632475, 0.014132272, -0.004940363, 0.030953895, 0.019102298, 0.0030452937, 0.030004714, -0.028211813, 0.06095861, -0.020446973, -0.018733172, -0.024850124, -0.032272205, -0.029108264, 0.045455296, -0.0020499704, 0.012154809, 0.0057906723, -0.018759537, 0.016281117, -0.040893946, -0.018930918, -0.0048348983, -0.006331179, 0.00031845403, 0.010388275, -0.0120427525, -0.011080387, 0.029451024, 0.0069738547, -0.013815878, -0.016096553, 0.008272389, 0.0036912651, 0.0006505031, 0.025074238, 0.01984055, -0.021738915, 0.020262409, -0.021607084, 0.032034907, 0.04645721, 0.05191501, -0.007725291, -0.035594344, 0.033986006, -0.0030947304, -0.009102924, 0.0032727022, 0.05811106, 0.01156157, -0.026273899, -0.013176499, -0.005530306, -0.0118581895, -0.08199882, 0.03464516, 0.0013949358, 0.037018117, 0.035567977, 0.020460155, -0.029899249, -0.029002799, 0.064069815, 0.006509151, -0.033748712, 0.0057544187, 0.036148034, -0.012662358, 0.014185005, -0.006828841, 0.0010159218, 0.02632663, -0.0073957136, -0.039311975, -0.0578474, 0.009841177, -0.05874385, -0.017362129, 0.022609, 0.016399764, -0.037677273, -0.069870375, 0.018232213, -0.0018588157, -0.017058918, 0.017283032, 0.05175681, -0.06148593, 0.035937104, -0.0031458149, 0.018482693, 0.0014847455, 0.010790359, -0.018456327, 0.011100162, 0.020921564, 0.030611135, -0.036543526, -0.021699367, 0.00032813536, -0.016808439, 0.013604949, -0.03016291, 0.031349387, 0.025482913, 0.020341508, -0.036886286, 0.037519075, -0.024375534, -0.026102519, -0.008101009, 0.036543526, -0.023571365, -0.02794815, 0.02837001, 0.009715937, -0.04582442, 0.02726263, -0.015213286, -0.033089556, 0.022556268, 0.008720614, 0.040524818, -0.036912654, 0.007606643, -0.009261121, 0.036174398, -0.006509151, 0.011693401, 0.016267933, -0.015780158, -0.040182058, -0.031402122, -0.0030963782, -0.06006216, 0.02739446, -0.018851819, -0.038389158, -0.025548829, -0.033115923, -0.0024405196, -0.010289402, 0.0022246465, -0.052415967, -0.057109147, 0.023518633, -0.015173737, -0.020301959, 0.016122919, -0.006934305, 0.02333407, 0.02550928, -0.076356456, -0.06101134, -0.0051150387, 0.023716379, 0.04843467, 0.030822065, -0.02163345, -0.016267933, 0.039733835, 0.020934748, -0.0008709079, 0.04065665, 0.017414862, -0.006934305, 0.023479084, -0.0140399905, 0.03003108, 0.033432316, 0.002419097, -0.0006043623, -0.040762115, -0.014369568, 0.038389158, -0.023584548, 0.03451333, 0.027631756, -0.003595688, 0.039707467, -0.062540576, 0.033906907, 0.011515429, 0.017111652, -0.01949779, 0.035884373, 0.09338901, -0.0075670937, -0.080785975, 0.027631756, 0.038837384, -0.031876713, -0.0038857157, -0.047037266, -0.0014097667, 0.0012589851, -0.017309397, -0.020064663, -0.0014229498, -0.037097216, 0.029002799, 0.022279423, -0.008061459, -0.015213286, 0.002028548, 0.033775076, -0.017296214, 0.020354692, 0.01429047, 0.049858447, -0.0061927564, -0.033880543, 0.069975846, 0.05341788, 0.016492046, -0.06016762, 0.023479084, -0.05610723, 0.00045687647, 0.0014394287, -0.03899558, 0.0073363897, -0.0069672633, -0.05763647, -0.015753793, 0.0022641958, -0.034750625, 0.028396375, -0.00049807364, 0.032852262, -0.00050219335, -0.017296214, -0.0069672633, -0.037650906, 0.017929003, -0.027974518, 0.04577169, -0.0130974, -0.02188393, -0.002926646, 0.023492267, 0.0100389235, 0.023070408, -0.032984093, -0.052758727, 0.011746134, 0.005536898, 0.036016203, -0.002681111, 0.017124834, -0.031085726, -0.008127
|
|||
|
"What are evals
|
|||
|
Example
|
|||
|
Our ground truth matches the predicted answer, so the evaluation passes!
|
|||
|
Evaluation
|
|||
|
Question
|
|||
|
Ground Truth
|
|||
|
Predicted Answer
|
|||
|
What is the populationof Canada?
|
|||
|
The population of Canada in2023 is 39,566,248 people.
|
|||
|
There are 39,566,248 peoplein Canada as of 2023.
|
|||
|
|
|||
|
An evaluation, or ""eval,"" involves a question and a correct answer, known as the ground truth. In this example, the question posed is, ""What is the population of Canada?""
|
|||
|
The process begins with a person asking this question. The language model (LLM) initially does not know the answer and decides to use a tool to find it. The LLM takes the action of searching, with the input being the question about Canada's population.
|
|||
|
The search tool then provides the answer: ""The current population of Canada is 39,566,248 as of Tuesday, May 23, 2023."" This result matches the actual result expected, which is that there are 39,566,248 people in Canada as of 2023.
|
|||
|
This example illustrates how evaluations are used to verify the accuracy of information provided by a language model.
|
|||
|
an example of an evaluation process, often referred to as ""evals."" The purpose of evals is to compare a predicted answer to a known correct answer, called the ""ground truth,"" to determine if they match.
|
|||
|
In this example, the question posed is: ""What is the population of Canada?"" The ground truth states that the population of Canada in 2023 is 39,566,248 people. The predicted answer is: ""There are 39,566,248 people in Canada as of 2023.""
|
|||
|
Since the predicted answer matches the ground truth, the evaluation is successful, as indicated by a checkmark. This process is crucial for verifying the accuracy of predictions in various applications.","[0.0008907861, 0.0046723066, 0.053993892, -0.0014870001, -0.010387791, 0.021416571, 0.0022230376, -0.0175455, 0.0037893758, 0.055250734, 0.039867, -0.036473528, -0.018136216, -0.02988768, -0.02918385, 0.014478809, 0.010702002, -0.03028987, -0.0406211, 0.030063638, 0.0023612902, 0.044089984, 0.025363052, 0.00857794, 0.0061899424, -0.042908553, -0.013649294, 0.06208795, -0.017746596, -0.0042669754, 0.01613784, -0.001058103, -0.0759132, -0.025036274, -0.016816534, -0.014566788, 0.0051530483, -8.356029e-05, 0.021806192, 0.027097493, 0.004040744, 0.032451637, -0.02767564, 0.058015782, -0.024885453, -0.0073650884, -0.014767882, -0.049770907, -0.037680097, 0.056708667, -0.0033526237, 0.016364072, 0.010570033, -0.00079298817, 0.014591925, -0.037604686, -0.010777412, -0.0069251945, -0.007434215, -0.008433403, 0.014830724, -0.017482659, -0.0046000383, 0.020938972, 0.0149815455, -0.014968977, -0.016678281, 0.01170119, 0.0065607103, -0.0060422635, 0.019041141, 0.029309534, -0.021856466, 0.011644633, -0.015295756, 0.03501559, 0.038258243, 0.048941392, 0.0013275384, -0.051279116, 0.035241824, -0.0004693516, -0.0045466227, 0.010651728, 0.050022274, 0.01304601, -0.018236764, -0.021391435, -0.003698255, -0.007132573, -0.079180986, 0.03755441, 0.009470297, 0.036347844, 0.015823629, 0.013297378, -0.016024724, -0.029711723, 0.0650541, -0.0017878565, -0.039867, 0.003032129, 0.035241824, -0.012461579, 0.01205939, -0.0038742125, -0.001548271, 0.025363052, -0.010142707, -0.034462582, -0.046679076, 0.01920453, -0.06017755, -0.021806192, 0.022057561, 0.01975754, -0.028329197, -0.08234823, 0.01740725, -0.0038176547, -0.012725516, 0.0071451413, 0.052334864, -0.055301007, 0.030767469, 0.0025356768, 0.023377243, 0.00042968255, 0.009482866, -0.015949313, 0.00073250267, 0.012907757, 0.040143505, -0.032049447, -0.026318252, -0.006944047, -0.01174518, -0.0052064643, -0.03044069, 0.03330629, 0.03257732, 0.014755314, -0.050474737, 0.040093232, -0.020913836, -0.0379566, -0.008112909, 0.02531278, -0.023050465, -0.029661449, 0.02752482, 0.021919308, -0.047181815, 0.02323899, -0.023628613, -0.03695113, 0.016741123, 0.01494384, 0.034889907, -0.04846379, 0.014202304, -0.007497057, 0.028555429, -0.0009112098, 0.014880998, 0.02245975, -0.012009117, -0.039364263, -0.027449409, -0.0014775738, -0.052234314, 0.027072357, -0.02332697, -0.035266962, -0.017419817, -0.0333817, -0.008829309, -0.018324742, -0.0023455797, -0.06183658, -0.061635487, 0.023377243, -0.0018931169, -0.031446163, 0.005847453, -0.0035003023, 0.028052693, 0.03468881, -0.07204213, -0.0449195, -0.0041821385, 0.018362448, 0.052686777, 0.0309937, -0.030666921, -0.019732405, 0.037755504, 0.0072896783, -0.0062276474, 0.035694286, 0.020411098, 0.0005969995, 0.03209972, -0.00980336, 0.03036528, 0.031119386, 0.006830931, -0.014089189, -0.05070097, -0.0044932067, 0.0420539, -0.015760787, 0.037127085, 0.03313033, -0.007182847, 0.040143505, -0.070182, 0.021366298, 0.022422045, 0.01660287, -0.021529688, 0.02815324, 0.09381062, -0.009112097, -0.081795216, 0.023704022, 0.03956536, -0.025350485, 0.009206361, -0.049318444, 0.005300727, -0.008521383, -0.015936745, -0.020838425, -0.005684064, -0.03692599, 0.040797062, 0.024722064, -0.006862352, -0.017093038, -0.008138046, 0.045899834, -0.013888094, 0.029636312, 0.015597397, 0.04469327, -0.0144285355, -0.034437444, 0.068925165, 0.044316217, 0.012493, -0.053742524, 0.024923159, -0.059021257, -0.0075787515, -7.3201176e-05, -0.030666921, 0.006001416, -0.004565475, -0.06314369, -0.025765242, 0.015245482, -0.03612161, 0.024407854, -0.0033840446, 0.039414536, -0.006032837, -0.017143313, 0.004354954, -0.043461565, 0.029410081, -0.038610157, 0.04680476, -0.01588647, -0.026117157, 0.0013558173, 0.025890926, 0.02356577, 0.02340238, -0.036976263, -0.054496627, 0.022585435, 0.009602265, 0.031043975, -0.00033895433, 0.019330217, -0.033758752, -0.010796265, -0.054044165, 0.01691708
|
|||
|
"Technical patterns
|
|||
|
Metric-based evaluations
|
|||
|
Component evaluations
|
|||
|
Subjective evaluations
|
|||
|
●
|
|||
|
●
|
|||
|
Comparison metrics likeBLEU, ROUGE
|
|||
|
Gives a score to filter andrank results
|
|||
|
●
|
|||
|
●
|
|||
|
Compares groundtruth to prediction
|
|||
|
Gives Pass/Fail
|
|||
|
●
|
|||
|
●
|
|||
|
Uses a scorecard toevaluate subjectively
|
|||
|
Scorecard may alsohave a Pass/Fail
|
|||
|
","[-0.028054638, 0.03298592, 0.04226081, -0.024579747, -0.0065154214, 0.008974673, 0.0006731005, -0.023634372, 0.022037454, 0.03830046, 0.0043883277, -0.044381518, -0.021781947, -0.016071372, 0.014487231, 0.005576434, 0.009677317, -0.0106035285, -0.018000448, 0.037201777, 0.035566535, -0.0038900897, 0.028029088, 0.004372359, 0.033599135, -0.02035111, 0.008719167, 0.04295068, 0.01029692, 0.0034589223, 0.011248684, -0.012992517, -0.016007496, -0.026547149, 0.015815865, 0.0119257765, -0.022561243, 0.027083712, 0.009734806, 0.009377097, 0.012820049, 0.054678436, -0.03835156, 0.006250333, -0.057693418, -0.021270934, 0.039705746, -0.02396653, -0.049696058, 0.034493405, -0.008687229, 0.058000024, 0.020070054, -0.038913675, 0.0322705, -0.008808594, -0.071439676, -0.01637798, 0.048137467, -0.00865529, 0.009153528, -0.01027137, 0.024656398, -0.0322194, -0.043078434, 0.0037559487, -0.044688124, -0.030558603, 0.009294057, 0.015049346, 0.05181676, 0.03648636, 0.040855523, -0.0013485964, 0.0042414116, -0.008137889, 0.03773834, 0.060197383, 0.010303308, -0.014487231, 0.03298592, -0.030149793, -0.018179303, -0.01563701, 0.0030676776, -0.026138337, -0.0645921, -0.04266962, -0.03114627, -0.03771279, -0.066431746, 0.019444061, 0.007269166, 0.03850486, 0.033624683, 0.020811021, -0.034876667, 0.0031826557, -0.025103536, 0.043972705, -0.0048003327, 0.018370934, -0.006199232, -0.0055093635, 0.08319299, 0.00011028708, 0.009377097, 0.015496482, 0.017847145, -0.0071861264, -0.03078856, 0.012206834, -0.0758855, 0.00788877, 0.045684602, -0.014500006, 0.0037048475, -0.023302212, 0.006173681, -0.01939296, -0.031733934, 0.008866083, 0.02664935, -0.03459561, 0.0043819402, -0.01484494, -0.019712344, 0.0006367706, -0.009875335, -0.00045951287, -0.015930844, -0.017157277, 0.042337462, -0.018255955, 0.009127977, 0.024694724, -0.0052634384, 0.017080624, -0.047779758, 0.018217629, 0.036767416, -0.0035834818, -0.0047620065, 0.055700466, -0.0035164112, -0.029945387, -0.04249077, 0.040191207, -0.021590319, 0.048163015, 0.0039316094, -0.010916525, -0.041315436, -0.022382388, -0.02851455, -0.054320727, 0.001374147, -0.006425994, -0.025537897, -0.047064338, 0.029919837, -0.009785907, -0.0048418525, 0.02856565, -0.010233044, 0.002270816, -0.037789445, -0.009543176, -0.04793306, 0.008348682, 0.008853308, -0.049670506, 0.019060802, -0.03574539, 0.009722031, -0.0032800676, -0.022918953, -0.04144319, -0.030686356, -0.031299572, -0.043078434, 0.0285401, -0.03308812, 0.009191854, -0.0154326055, -0.024273138, 0.00070863194, 0.05585377, -0.04829077, -0.010871811, -0.025371818, 0.038760368, 0.07057095, 0.022906177, -0.029000012, -0.008444497, 0.010897362, 0.02410706, -0.030200895, 0.029536577, 0.013937891, -0.021347586, 0.031836137, 0.012225997, -0.024988556, 0.0042957067, -0.015100447, -0.008042074, -0.0682714, -0.035183277, 0.0051452667, 0.030584155, 0.020926, 0.05365641, -0.06045289, 0.025921157, -0.048239667, 0.03278151, -0.017770492, 0.036792967, -0.023519393, -0.011306172, 0.042081956, 0.0152665265, -0.046553325, 0.023455517, 0.062190335, -0.048852883, 0.027518073, -0.101027355, 0.012296261, -0.009722031, -0.026189439, 0.031478427, -0.023072256, -0.03117182, 0.00750551, 0.017144501, -0.02059384, -0.034416754, 0.012883927, 0.027799131, -0.0073841442, 0.0028329308, -0.03382909, 0.02399208, -0.014806614, -0.01996785, 0.027185915, 0.004385134, 0.01788547, -0.029408824, -0.022880627, -0.0044617862, 0.05406522, -0.037355084, -0.0041104644, 0.024055958, 0.0071414127, -0.028616752, -0.049568303, 0.018319832, -0.038760368, 0.0061321612, -0.0646432, 0.0136057325, 0.008610576, 0.002692402, 0.010724895, -0.05472954, 0.002152644, 0.018703092, 0.040089004, 0.02010838, -0.0129222525, -0.041800898, 0.039475787, 0.027952434, -0.023672698, -0.047294293, -0.024669174, -0.0077163028, 0.067044966, 0.015470932, 0.007901546, -0.009517625, 0.01303723, -0.019520713, -0.00083518756, 0.0008439706, 0.034467857, -0.022612344, 0.07506787, -0.017872695, -0.0038038562, -0.0016464214, 0.012443177, -0.034493405, -0.027569175, -0.0646943, 0.01903525, -0.024209261, -0.02240794, 0.012634807, -0.0290511
|
|||
|
"Technical patterns
|
|||
|
Metric-based evaluations
|
|||
|
ROUGE is a common metric for evaluating machine summarizations of text
|
|||
|
ROUGE
|
|||
|
Metric for evaluatingsummarization tasks
|
|||
|
Original
|
|||
|
OpenAI's mission is to ensure thatartificial general intelligence (AGI)benefits all of humanity. OpenAIwill build safe and beneficial AGIdirectly, but will also consider itsmission fulfilled if its work aidsothers to achieve this outcome.OpenAI follows several keyprinciples for this purpose. First,broadly distributed benefits - anyinfluence over AGI's deploymentwill be used for the benefit of all,and to avoid harmful uses or undueconcentration of power…
|
|||
|
MachineSummary
|
|||
|
OpenAI aims to ensure AGI isfor everyone's use, totallyavoiding harmful stuff or bigpower concentration.Committed to researchingAGI's safe side, promotingthese studies in AI folks.OpenAI wants to be top in AIthings and works withworldwide research, policygroups to figure AGI's stuff.
|
|||
|
ROUGEScore
|
|||
|
.51162
|
|||
|
","[-0.0128309075, 0.032444675, 0.020885551, 0.0104992995, 0.0027555362, -0.011234109, -0.01117052, 0.0010165456, 0.00041465522, 0.020376837, 0.029335862, -0.045190793, -0.050475772, -0.007397555, 0.010259073, 0.020730112, -0.017211502, -0.036881793, -0.015275562, 0.030522862, 0.020899683, 0.0052425843, 0.022849753, 0.019062659, -0.008916632, -0.008570424, 0.021846456, -0.008803585, 0.0015535218, 5.7903795e-05, 0.0019518381, -0.016236467, -0.016081028, -0.02809234, 0.008676406, 0.01865286, -0.0052284533, -0.005885543, 0.028728232, 0.0040661823, 0.01718324, -0.010315597, 0.0012293931, 0.039623197, -0.022666052, -0.023923706, 0.035779577, -0.04547341, -0.011276502, 0.049486604, -0.042562436, 0.024305243, -0.0005528736, -0.024079148, -0.016448433, 0.011997181, -0.031992484, -0.0018423232, 0.04086672, -0.005140135, -0.01569949, -0.02841735, 0.030325029, -0.032727294, -0.049486604, 0.0028862476, -0.09835145, 0.02249648, 0.022425827, -0.04041453, 0.015812539, 0.0044265217, 0.03493172, -0.03713615, -0.0068252515, -0.021648623, 0.019896384, 0.09043811, 0.0011675701, -0.037390508, -0.0021532043, -0.018271325, 0.012089032, -0.06381539, -0.0007851512, -0.041177604, -0.06782858, -0.045784295, -0.06228925, -0.010902032, -0.07738111, 0.016674528, -0.014710324, 0.02235517, 0.04959965, -0.009128597, 0.0039672656, 0.03713615, 0.021267088, 0.056721654, -0.033038173, -0.008471508, -0.026806422, 0.0056983074, 0.016801706, 0.039340578, 0.035723053, 0.0020578203, 0.0023740004, -0.034225173, -0.07596801, -0.005839617, -0.043014627, 0.012781449, 0.017112587, -0.020829028, -0.029561957, 0.01154499, 0.008584555, -0.02590204, -0.04527558, 0.004896376, 0.008301936, -0.043240722, -0.02662272, -0.049090937, 0.025548767, -0.011205847, -0.008619882, 0.0034249902, 0.028049946, 0.017819135, 0.026241183, -0.028827148, 0.009955258, -0.011728693, 0.01596798, -0.0012152621, -0.04389075, 0.010054175, 0.0078356145, 0.00439826, -0.05785213, 0.04315594, -0.0310881, -0.043127675, -0.050193153, 0.013353753, -0.014554883, 0.024729172, -0.010668871, -0.022439957, -0.057767343, 0.01021668, -0.038634032, -0.058106486, -0.0037235066, -0.014908157, -0.02857279, -0.050984487, 0.015275562, 0.019218098, -0.022001898, 0.022976933, 0.0029251077, 0.061780535, -0.047112603, -0.014964681, -0.05906739, -0.044201627, -0.010810181, -0.0586152, -0.0060869087, -0.016024504, -0.025986826, -0.032077268, -0.047338698, -0.007941597, -0.0041297716, -0.020744242, -0.034705624, 0.046971295, 0.007680174, 0.0049034413, -0.034225173, -0.03685353, 0.009100335, 0.008372591, -0.024941135, 0.011149324, 0.0051719295, 0.015134253, 0.050193153, 8.312976e-05, 0.026142268, -0.042929843, 0.03312296, -0.012746122, 0.009785687, -0.001329193, 0.019430064, -0.010711264, 0.0108172465, -0.023273682, -0.028742362, -0.024361767, 0.022623658, -0.025774863, -0.06183706, 0.0111422585, 0.039171007, 0.025661815, 0.03594915, 0.05785213, -0.042732008, -0.035299126, -0.020829028, 0.04883658, -0.00081782904, 0.03340558, -0.05106927, 0.015953848, 0.01006124, 0.039905816, -0.021521445, 0.029816315, 0.0681112, -0.03804053, 0.071389586, -0.06912863, 0.035440434, 0.016292991, -0.0756854, -0.03730572, -0.001180818, -0.044399463, 0.04923225, -0.0034921123, -0.042816795, -0.0006297107, 0.009722097, 0.017338682, 0.020758374, 0.0041297716, -0.002170868, 0.0011684534, -0.0059703286, -0.026735768, 0.038153578, -0.007772025, -0.00080634764, -0.031314198, 0.028332565, -0.00687471, 0.015671229, -0.041347176, -0.008690537, 0.008549227, -0.018101754, -0.01851155, -0.055506393, -0.018455027, -0.036655698, -0.00902968, -0.004044986, 0.01835611, 0.0060515814, 0.007574192, 0.013424408, -0.0012788514, -0.008867174, 0.008711734, 0.029788053, 0.04940182, -0.07263311, -0.014667931, 0.020320313, 0.0414037, -0.04278853, -0.026749898, 0.0104922345, 0.0071855905, 0.055365082, 0.026354231, 0.0152473, -0.009057942, 0.008775323, 0.017409336, 0.0058078226, 0.0018511551, 0.03323601, -0.03727746, 0.057626035, -0.041488484, -0.02809234, -0.0028244245, 0.038831864, -0.009199251, -0.026114006, -0.033066437, 0.08275087, -0.009453609, 0.02441829, 0.00279792
|
|||
|
"Technical patterns
|
|||
|
Metric-based evaluations
|
|||
|
BLEU score is another standard metric, this time focusing on machine translation tasks
|
|||
|
BLEU
|
|||
|
Original text
|
|||
|
Reference
|
|||
|
Translation
|
|||
|
PredictedTranslation
|
|||
|
Metric forevaluatingtranslation tasks
|
|||
|
Y gwir oedddoedden nhwddim yn dweudcelwyddau wedi'rcwbl.
|
|||
|
The truth wasthey were nottelling lies afterall.
|
|||
|
The truth wasthey weren'ttelling lies afterall.
|
|||
|
BLEUScore
|
|||
|
.39938
|
|||
|
","[-0.013958204, 0.017577937, 0.0006699684, -0.021299278, 0.004184921, 0.0035784566, 0.033733383, -0.010179709, -0.022061327, 0.008357141, -0.0062202276, -0.02954211, -0.059389044, 0.017235015, 0.034952663, 0.06274206, -0.018149475, -0.023267906, -0.06507901, 0.037188005, 0.0401854, -0.025325438, 0.015266388, 0.0073855277, 0.024385577, 0.007074358, 0.04295418, -0.026265299, -0.020930955, 0.009036635, -0.008979481, -0.012643668, 0.031447235, -0.021604098, -0.0029608791, 0.016155446, 0.026849538, 0.02611289, 0.052581403, -0.0056931432, -0.0031307526, -0.008915977, 0.010922707, -0.011430739, -0.04887276, 0.012929437, 0.04201432, 0.0073791775, -0.011614902, 0.041201465, -0.023864845, 0.05486755, 0.0011494244, -0.0025084123, 0.002776717, -0.010865553, -0.038356483, 0.014567843, 0.021350082, -0.027891004, 0.01653647, 0.004292878, 0.0026878114, -0.023737837, -0.029770726, -0.0085032005, -0.030558178, 0.012662719, 0.030100947, -0.023623528, 0.081336066, 0.016574573, 0.052124172, -0.012751625, 0.0047564576, -0.01283418, 0.04310659, 0.068584435, 0.029110285, 0.00641709, 0.007938013, -0.05207337, -0.028551448, -0.046154786, -0.00061876816, -0.017527133, -0.0572045, -0.019571966, 0.012618266, -0.007042606, -0.066552304, -0.015952231, 0.0037118152, -0.02580807, 0.022340745, 0.03294593, -0.041430082, 0.013272359, -0.019686274, 0.022836078, 0.0070235543, 0.024652295, 0.0042420747, -0.01345017, 0.071022995, -0.0024147436, 0.04140468, -0.03182826, -0.018848019, 0.008992182, -0.088194504, 0.049050573, -0.028246628, 0.0148345595, 0.080116786, -0.028195824, 0.019762479, 0.010922707, 0.00895408, 0.03180286, 0.021159569, 0.0057090195, 0.04031241, -0.04031241, 0.0036038582, -0.0015534692, -0.0072394684, 0.019686274, -0.021820012, 0.01869561, 0.01931795, -0.014453535, 0.03805166, 0.018911524, 0.010122555, 0.0073664766, 0.018873421, -0.017971663, -0.04854254, -0.009195395, 0.024703098, 0.0020892853, 0.014402732, 0.04358922, -0.060506716, -0.026798734, -0.049253788, 0.025935078, -0.004943795, 0.04033781, -0.0060741683, 0.00062273716, -0.039118532, 0.009785983, -0.040668033, -0.06594267, -0.0030529601, 0.0048612393, -0.008357141, -0.0386105, -0.007093409, -0.010960809, -0.007004503, 0.04097285, 0.020994458, 0.027179759, -0.014174117, 0.0075061857, -0.05827137, -0.0024004553, 0.0018384439, -0.040083792, -0.0038705755, -0.036552966, -0.030227955, -0.0069155977, 0.0015907779, -0.074274406, -0.02195972, 0.0040261606, -0.019660871, 0.03845809, -0.008160278, 0.0006441698, 0.013069145, -0.025325438, -0.025541352, 0.036095735, -0.020880152, -0.023547323, -0.025173029, 0.032056876, 0.07656056, -0.002094048, 0.007048956, -0.02875466, 0.04651041, 0.011373586, -0.051514532, 0.055527993, 0.008681011, -0.013043744, 0.03012635, 0.024258569, -0.020930955, 0.009347805, -0.03256491, -0.016790487, -0.06751757, -0.013310461, 0.025541352, 0.014732953, 0.034393825, 0.031142415, -0.08672121, 0.03480025, -0.044579886, 0.049507804, 0.017997064, 0.019902188, -0.03134563, -0.0019241745, 0.061370373, 0.022620164, -0.037416622, 0.008299987, 0.047704287, -0.02178191, 0.008706413, -0.06431696, 0.044122655, -0.033326957, -0.04607858, -0.0076585957, -0.018035168, -0.003876926, -0.010789348, 0.021388184, -0.034241416, 0.018327286, -0.011551398, 0.015164781, -0.022226438, 0.022480454, -0.038102467, 0.03523208, -0.024360176, -0.034368426, 0.03581632, 0.027611587, 0.0072585195, -0.0046993042, 0.009678027, -0.008420645, 0.017476331, -0.01298659, -0.00023436986, 0.003464149, 0.023090094, -0.0065409234, -0.028399037, 0.005042226, -0.067873195, -0.0026195445, -0.041150663, -0.011767311, -0.025084123, 0.043309804, 0.004962846, -0.03459704, -0.00033419038, -0.028729258, 0.0494824, 0.0058804806, -0.0028132321, -0.05425791, -0.012072131, 0.029592915, -0.018339986, -0.019559266, -0.005534383, 0.016955597, 0.038889915, -0.018733712, -0.0018241556, -0.01715881, -0.026976546, 0.01592683, -0.0032339469, 0.012732574, 0.023991853, -0.055934418, 0.039194737, -0.012097533, 0.007925313, 0.0010478178, 0.025795368, -0.03828028, 0.0049406197, -0.05380068, 0.0066234786, -0.0010621062, 0.00049295067, 0.0
|
|||
|
"Technical patterns
|
|||
|
Metric-based evaluations
|
|||
|
What they’re good for
|
|||
|
What to be aware of
|
|||
|
●
|
|||
|
●
|
|||
|
A good starting point for evaluating a
|
|||
|
● Not tuned to your specific context
|
|||
|
fresh solution
|
|||
|
Useful yardstick for automated testing
|
|||
|
of whether a change has triggered a
|
|||
|
major performance shift
|
|||
|
● Most customers require more
|
|||
|
sophisticated evaluations to go to
|
|||
|
production
|
|||
|
● Cheap and fast
|
|||
|
","[0.0025943958, 0.021275414, 0.032720875, -0.011404389, 0.029900583, 0.02504037, -0.030338686, -0.027888043, 0.042304397, 0.03573284, 0.036444757, -0.011630286, -0.031379182, -0.012958288, 0.037649542, 0.022055786, -0.02175459, -0.0313518, -0.017168192, 0.0313518, 0.048547376, 0.026518969, 0.021111125, -0.0015427757, 0.020892074, -0.011821956, -0.0005151142, 0.03704715, 0.007523063, -0.03556855, 0.034035187, -0.017715821, -0.027833281, -0.03502092, 0.040825795, 0.0412639, -0.0038162947, 0.0239588, 0.034664962, 0.0135880625, 0.010822533, 0.04994383, -0.0144026615, 0.04014126, -0.031844668, -0.032693494, 0.049670015, -0.0044597597, -0.039511483, 0.029873202, -0.020727785, -0.013499073, 0.03148871, -0.037101913, 0.025382638, -0.0049936986, -0.0519153, 0.0023137357, 0.046192568, 0.0064312266, -0.00939185, -0.016442582, 0.0116645135, -0.04646638, -0.03795074, 0.03559593, -0.027422559, 0.014457424, 0.0028493858, 0.015374704, 0.04977954, 0.015237797, 0.03559593, -0.0014957137, 0.0010225273, 0.006153989, 0.026546352, 0.06303218, 0.013697589, 0.01992003, -0.002924685, -0.025861813, -0.040059116, 0.001747281, 0.020152774, 0.0041517178, -0.05054622, -0.06998708, 0.007420383, -0.012280596, -0.04361871, 0.025834432, 0.029216046, 0.04605566, 0.026669567, 0.009193334, -0.008926365, 0.039100762, -0.008323972, 0.06253932, 0.020481352, 0.016250912, -0.027313033, 0.016223531, 0.08762076, -0.012232679, -0.001654013, 0.028531509, -0.00076026405, 0.014115156, -0.042632975, -0.030283924, -0.045179453, 0.012041008, 0.005164833, 0.030530358, -0.010562408, 0.015936024, 0.047315206, -0.03039345, -0.026724331, 0.02508144, 0.0016437449, -0.022384364, -0.009131726, -0.066920355, -0.006852217, 0.0048088734, -0.014293136, 0.003956625, 0.01115111, 0.017264027, 0.04868428, -0.0134580005, -0.0017661059, -0.018701555, 0.003648583, 0.04564494, -0.01150707, 0.010966285, 0.062867895, -0.011335935, 0.010274903, 0.05583085, 0.005414689, 0.0067769177, -0.016798541, 0.025451092, 0.001377631, 0.042468686, -0.01298567, 0.0045042546, -0.028668417, -0.026094556, 0.008378735, -0.033980425, -0.014717549, -0.011623441, -0.001364796, -0.046192568, 0.013232104, 0.0054762973, -0.03888171, 0.047835454, -6.791892e-05, 0.0035356344, -0.03573284, -0.038470987, -0.067687035, 0.014580641, 0.028148167, -0.054872498, 0.0049492037, -0.017195573, 0.021165889, 0.0017900646, -0.051285524, -0.054105815, -0.03225539, -0.029133901, -0.035075683, 0.016168768, -0.034664962, -0.013211567, -0.030804172, -0.049670015, -0.0353495, 0.031817287, -0.02079624, -0.0217409, -0.039046, 0.017387243, 0.036253087, 0.020481352, 0.015607447, -0.051696245, 0.036937624, 0.025587998, -0.014457424, 0.03721144, 0.0027415713, -0.056898728, 0.07962536, 0.03704715, -0.01215738, 0.0008398415, 0.00029178397, -0.0019030133, -0.079406306, -0.02910652, -0.019372402, 0.025478473, 0.009371313, 0.07206807, -0.021398632, 0.021672446, 0.01638782, 0.016442582, 0.005466029, 0.0641822, -0.0070849597, -0.013704434, 0.049998593, 0.018715246, -0.005370194, 0.045261595, 0.022808777, -0.057391595, 0.018222379, -0.09550662, 0.004870482, -0.01677116, -0.04824618, 0.016606871, -0.031105367, 0.015456849, -0.028093405, 0.0036828099, -0.04830094, -0.06242979, 0.0005476297, 0.02209686, -0.03762216, -0.0007114908, -0.044330627, 0.025505854, -0.02504037, -0.006653701, 0.013574372, 0.025108824, -0.014662785, -0.035431642, -0.042824645, -0.0033816134, 0.047205683, -0.056296334, 0.005394153, 0.026998146, 0.011445461, -0.0120546995, -0.027668992, 0.0062806285, -0.0357876, -0.010637707, -0.055064168, 0.016360437, 0.016620561, -0.0061882157, 0.007002815, -0.028887467, 0.079461075, -0.004832832, 0.033843517, -0.007872177, -0.026724331, -0.04956049, 0.017181883, 0.02504037, -0.035431642, -0.028093405, -0.02948986, -0.021891499, 0.0766134, -0.01638782, 0.0026063751, -0.007256094, 0.031105367, 0.0069993925, 0.0022966221, 0.017578915, -0.013827651, 0.0039395113, 0.032529205, -0.0016950851, -0.014539569, -0.007961167, 0.0030427675, -0.04350918, -0.037293583, -0.08477308, 0.048574757, 0.03532212, 0.0050895335, 0.0074683004, 0.0057124626, -0.00236678
|
|||
|
"Technical patterns
|
|||
|
Component evaluations
|
|||
|
Component evaluations (or “unit tests”) cover a single input/output of the application. They checkwhether each component works in isolation, comparing the input to a ground truth ideal result
|
|||
|
Is this thecorrect action?
|
|||
|
Exact matchcomparison
|
|||
|
Does this answeruse the context?
|
|||
|
Extract numbersfrom each andcompare
|
|||
|
What is the populationof Canada?
|
|||
|
Thought: I don’t know. Ishould use a tool
|
|||
|
Action: Search
|
|||
|
Action Input: What is thepopulation of Canada?
|
|||
|
Agent
|
|||
|
Search
|
|||
|
There are 39,566,248 peoplein Canada as of 2023.
|
|||
|
The current population ofCanada is 39,566,248 as ofTuesday, May 23, 2023….
|
|||
|
Is this the rightsearch result?
|
|||
|
Tag the rightanswer and doan exact matchcomparison withthe retrieval.
|
|||
|
","[-0.038040116, 0.014565361, 0.065326035, 0.0305465, 0.0049909777, 0.025269506, -0.0060099093, 0.00030322155, -0.0056166374, 0.04441827, 0.05660255, -0.03074671, -0.02662808, -0.039556, -0.020235626, 0.029030615, 0.005945556, -0.00692516, -0.0413007, 0.019520586, 0.034808137, -0.009252614, -0.015544965, 0.00088039273, 0.008837892, 0.011755254, -0.034007292, 0.06589807, -0.010196467, -0.0032587938, 0.019806601, -0.022595257, -0.07173279, 0.0073577594, 0.016917842, -0.008702034, 0.020750454, 0.011276177, 0.016975045, 0.0060385107, 0.012291534, 0.040900275, -0.008122852, 0.051196847, -0.03220539, -0.054915056, -0.048308086, -0.057088777, -0.03829753, 0.03666724, -0.025083596, 0.0025866565, -0.019506285, -0.0119483145, 0.0027332394, 0.011483539, -0.071332365, -0.0089809, 0.07299126, 0.03326365, 0.020392934, -8.206199e-05, -0.009131058, 0.020435836, -0.006485411, 0.01706085, -0.014229291, 0.00701454, 0.024640271, -0.0045226268, 0.0057989727, 0.026027448, 0.018734042, -9.3625524e-05, -0.012663354, 0.04224455, 0.025298107, 0.022094728, -0.025612725, -0.039613202, 0.013735914, -0.02066465, 0.025984546, -0.010275122, 0.008058499, -0.0071468228, -0.016889239, -0.03609521, -0.03397869, -0.032291196, -0.058204237, 0.054228615, -0.0023864452, -0.0011163559, 0.019778, -0.03500835, -0.017861694, 0.02607035, 0.022123331, 0.052369513, 0.003650278, -0.013213935, -0.0022219862, 0.015945386, 0.06092139, 0.014801323, -0.022123331, 0.035694785, -0.031175734, 0.0035930749, -0.05803263, -0.011097417, -0.06200825, 0.035694785, 0.045276318, 0.021336786, -0.037239272, -0.067728564, 0.016474517, -0.007801084, -0.051111042, 0.0111403195, -0.0123773385, -0.03129014, 0.021837315, -0.031690564, 0.016388712, -0.031004125, -0.03435051, -0.005062482, 0.02894481, 0.051740278, 0.015201746, 0.0040220986, -0.022366444, -0.027428925, -0.039813414, 0.029888663, -0.05105384, -0.0009697727, 0.042158745, -0.014157788, 0.018848449, 0.055315476, -0.03197658, -0.030718109, -0.026828293, 0.024883384, -0.024926286, -0.043245606, 0.009288367, -0.012684805, -0.057832416, -0.020964967, 0.015044437, -0.037067663, 0.022080429, -0.008423168, -0.009502878, -0.009038103, -0.016031193, -0.061550625, 0.021265283, 0.010353776, -0.00051035965, 0.0043760436, -0.032462806, -0.03397869, -0.056001917, 0.011361982, 0.006453234, -0.045362122, 0.0067177988, -0.045047507, -0.028344177, -0.037839904, -0.01849093, -0.036209613, -0.041500907, -0.027915154, -0.046591993, 0.0010814976, -0.016417313, -0.032777425, 0.029459639, -0.04278798, 0.04601996, 0.0054915054, -0.06904424, 0.01026082, 0.026713885, 0.0010028433, 0.031518955, -0.0069323108, -0.02893051, -0.033664074, 0.03543737, -0.025484018, 0.014944332, 0.021851616, 0.021608502, -0.032577213, 0.041272096, 0.027100008, -0.019778, -0.008644831, -0.00075213244, 0.012556098, -0.04750724, -0.009731691, 0.03429331, -0.021351088, 0.017675783, 0.05325616, -0.018605335, 0.005702442, -0.03520856, 0.013950426, -0.012899318, 0.027543332, -0.022895575, 0.027357422, 0.04381764, 0.0028297699, -0.02536961, 0.05605912, 0.08351664, -0.034607925, -0.014350848, -0.057832416, 0.031804968, 0.019720796, -0.0011056303, -0.015244648, -0.0038540645, -0.03543737, 0.03572339, 0.0050052786, -0.049108934, 0.004204434, -0.045276318, 0.022023225, -0.008501823, 0.025784334, -0.029631248, 0.03326365, -0.0006363854, -0.047192626, 0.046935212, 0.01849093, -0.0022631008, -0.052569725, 0.019820902, -0.046620592, 0.008065648, -0.009309818, -0.0011208248, 0.03452212, 0.00048622704, -0.029202225, -0.042158745, 0.028787501, -0.045362122, -0.013449898, -0.033835683, 0.021665705, 0.04636318, -0.009924752, -0.0118982615, -0.049166135, -0.011748103, 0.022309242, 0.07156118, -0.0045226268, -0.0827158, -0.0065354635, -0.015773777, 0.038812358, 0.015659371, -0.038154524, -0.06395316, 0.028701697, 0.015616469, 0.046820804, 0.031061327, 0.005856176, -0.009545781, 0.0038218875, -0.016917842, 0.0040435498, 0.041272096, -0.032233994, 0.0016669364, 0.004958801, -0.026156155, 0.020979267, 0.04175832, -0.011891112, 0.011740953, -0.017861694, 0.0075579705, -0.011261877, -0.0020003237, -0.00583
|
|||
|
"Technical patterns
|
|||
|
Subjective evaluations
|
|||
|
Building up a good scorecard for automated testing benefits from a few rounds of detailed humanreview so we can learn what is valuable.
|
|||
|
A policy of “show rather than tell” is also advised for GPT-4, so include examples of what a 1, 3 and8 out of 10 look like so the model can appreciate the spread.
|
|||
|
Examplescorecard
|
|||
|
You are a helpful evaluation assistant who grades how well the Assistant has answered the customer’s query.
|
|||
|
You will assess each submission against these metrics, please think through these step by step:
|
|||
|
-
|
|||
|
relevance: Grade how relevant the search content is to the question from 1 to 5 // 5 being highly relevant and 1 beingnot relevant at all.
|
|||
|
- credibility: Grade how credible the sources provided are from 1 to 5 // 5 being an established newspaper,
|
|||
|
-
|
|||
|
government agency or large company and 1 being unreferenced.
|
|||
|
result: Assess whether the question is correct given only the content returned from the search and the user’squestion // acceptable values are “correct” or “incorrect”
|
|||
|
You will output this as a JSON document: {relevance: integer, credibility: integer, result: string}
|
|||
|
User: What is the population of Canada?
|
|||
|
Assistant: Canada's population was estimated at 39,858,480 on April 1, 2023 by Statistics Canada.
|
|||
|
Evaluation: {relevance: 5, credibility: 5, result: correct}
|
|||
|
","[-0.0079006115, 0.010659105, 0.056499626, 0.017399734, 0.005209311, -0.01829094, -0.016423652, -0.019111415, 0.030301, 0.052001156, 0.04804024, -0.03117806, -0.03267755, -0.06473267, -0.022676239, 0.017060228, -0.00024844133, 0.004325178, -0.01986116, 0.01404003, 0.022761116, -0.014938309, 0.014351244, -0.012844682, 0.041504733, 0.0017054923, -0.029225895, 0.017003642, -0.016225606, -0.008820109, 0.004685904, -0.0134176, -0.03644042, -0.02011579, 0.017286565, -0.017229982, 0.008141095, 0.011649335, 0.04059938, 0.0028805048, 0.006291489, 0.041900825, 0.033894118, 0.033328272, -0.04852121, -0.026424963, 0.03344144, -0.04099547, -0.029706864, 0.04560711, -0.052340664, 0.04979436, 0.002687764, -0.013290285, 0.00697404, -0.0006648679, -0.04249496, -0.02457182, 0.035676528, 0.021643572, 0.005492233, -0.018757762, 0.021120165, 0.013092239, -0.04311739, -0.021968933, -0.04207058, 0.016805597, 0.025873264, 0.0126041975, 0.03661017, 0.040627673, 0.033045348, -0.040542796, 0.02314306, -0.009824485, 0.043541774, 0.030385878, -0.0022845992, -0.031772196, -0.019012393, -0.02307233, -0.018517278, -0.044277374, 0.0072781816, 0.00252862, -0.04224033, -0.05279334, -0.04540906, -0.050756298, -0.058282036, 0.011550312, -0.026382525, 0.024812303, 0.03279072, -0.024996204, -0.025816679, 0.0025975823, -0.0010459292, 0.010446914, 0.00356836, 0.0054886965, -0.013198335, 0.01394808, 0.07712468, 0.030951723, -0.0059944205, 0.032479506, -0.03983549, -0.040005244, -0.07174915, 0.028773218, -0.102417946, -0.0111542195, 0.034346793, -0.010008384, -0.048832424, -0.055141598, 0.009782046, -0.028886389, -0.038336, 0.023652323, 0.0057999115, -0.042325206, 0.0007188, -0.055113304, 0.008056219, -0.010086187, -0.018969955, -0.02676447, -0.02764153, 0.010015457, 0.06586436, -0.04020329, -0.013339796, 0.007341839, -0.018715324, -0.004480785, -0.03256438, 0.0033968384, 0.050982635, -0.0152353775, -0.030810261, 0.05884788, -0.031602446, -0.023836222, -0.028207375, 0.051350437, -0.07797344, 0.0058282036, 0.01967726, 0.004431274, -0.053953324, 0.0038088444, 0.026028872, -0.02734446, 0.004201399, 0.02716056, -0.037996493, -0.04074084, 0.014513925, -0.0350541, 0.009025228, 0.020907974, -0.009640585, 0.05417966, -0.045974907, -0.026736178, -0.057518147, 0.0003892395, -0.011691772, -0.047332935, 0.0030856237, -0.034742884, -0.0067795306, -0.0071826954, -0.043060806, -0.004257984, -0.032366335, -0.042777885, -0.04498468, -0.015249523, -0.01810704, -0.007012942, -0.013219554, -0.04323056, 0.017442172, 0.019068977, -0.046314415, 0.018856786, 0.0003474642, 0.0052199205, 0.06348781, -0.0132124815, -0.020441152, -0.042042285, 0.05884788, -0.01766851, -0.009018155, 0.053840153, 0.008756451, 0.015164646, 0.0040705474, -0.010637887, -0.00836036, -0.034488253, -0.011903965, -0.020794805, -0.09364735, -0.026821055, 0.030499047, 0.006669898, 0.0021201505, 0.047927074, -0.047870487, 0.023284523, -0.02519425, -0.01226469, -0.021601133, 0.04436225, -0.024430359, 0.02953711, 0.043456897, -0.00513858, -0.025562048, 0.042325206, 0.056358162, -0.025972286, 0.02953711, -0.064902425, 0.019776283, 0.011797869, -0.0134176, -0.018998247, -0.015857806, -0.027825428, 0.053585522, 0.01759778, -0.034771178, -0.037402354, 0.0037487233, 0.024104998, 0.029706864, 0.009824485, -0.021162603, 0.015447569, -0.027259585, -0.05907422, 0.07276767, 0.009315223, 0.022973308, -0.06988186, 0.012717367, -0.003002515, -0.015475862, -0.018064601, 0.006666362, 0.020625051, 0.00066442584, -0.06467608, -0.020030914, 0.036412127, -0.029254187, -0.03256438, -0.031857073, 0.025151812, -0.024345482, -0.015348546, -0.030357586, -0.047813904, 0.020879682, 0.043060806, 0.037883323, 0.032620966, -0.031121476, 0.002429597, -0.030470755, 0.013559061, -0.01577293, -0.033582903, -0.04147644, -0.006075761, 0.01672072, 0.049483147, 0.02457182, 0.014810993, -0.024274752, -0.013905642, 0.01106227, -0.018969955, 0.04351348, -0.024784012, 0.049822655, -0.026707886, 0.0036638465, -0.008091584, 0.01979043, -0.011125928, -0.00713672, -0.012964924, 0.0080349995, -0.02438792, 0.015758784, -0.011642261, -0.02979174, 0.017696803, 0.002
|
|||
|
"Example framework
|
|||
|
Your evaluations can be grouped up into test suites called runs and executed in a batch to testthe effectiveness of your system.
|
|||
|
Each run should have its contents logged and stored at the most granular level possible(“tracing”) so you can investigate failure reasons, make tweaks and then rerun your evals.
|
|||
|
Run ID Model
|
|||
|
Score
|
|||
|
Annotation feedback
|
|||
|
Changes since last run
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
gpt-3.5-turbo 28/50
|
|||
|
gpt-4
|
|||
|
/50
|
|||
|
gpt-3.5-turbo 34/50
|
|||
|
● 18 incorrect with correct search results
|
|||
|
● 4 incorrect searches
|
|||
|
N/A
|
|||
|
● 10 incorrect with correct search results
|
|||
|
● 4 incorrect searches
|
|||
|
● 12 incorrect with correct search results
|
|||
|
● 4 incorrect searches
|
|||
|
Model updated to GPT-4
|
|||
|
Added few-shot examples
|
|||
|
gpt-3.5-turbo 42/50
|
|||
|
● 8 incorrect with correct search results
|
|||
|
Added metadata to search
|
|||
|
Prompt engineering for Answer step
|
|||
|
gpt-3.5-turbo 48/50
|
|||
|
● 2 incorrect with correct search results
|
|||
|
Prompt engineering to Answer step
|
|||
|
|
|||
|
This diagram illustrates a framework for processing a return request using a language model (LLM) system. Here's a breakdown of the process:
|
|||
|
. **User Input**: The user wants to return a T-shirt purchased on Amazon on March 3rd.
|
|||
|
. **Router**: The initial input is processed by a router LLM, which determines the nature of the request. The expected and predicted outcomes are both ""return,"" and the process passes this evaluation.
|
|||
|
. **Return Assistant**: The request is then handled by a return assistant LLM. It interacts with a knowledge base to verify the return policy.
|
|||
|
. **Knowledge Base**: The system checks the return policy, confirming that the item is eligible for return within 14 days of purchase. The expected and predicted outcomes are ""return_policy,"" and this step also passes.
|
|||
|
. **Response to User**: The system responds to the user, confirming that the return can be processed because it is within the 14-day window.
|
|||
|
. **Evaluation**: The response is evaluated for adherence to guidelines, scoring 5 for politeness, 4 for coherence, and 4 for relevancy, resulting in a pass.
|
|||
|
The framework uses both component evaluations (red dashed lines) and subjective evaluations (orange dashed lines) to ensure the process is accurate and user-friendly.","[-0.03659074, 0.061189555, 0.020709129, -0.027366182, 0.031732474, -0.0153435115, -0.009870275, 0.056546528, 0.03699047, 0.091569096, 0.02865762, -0.05882192, -0.029564701, -0.022969143, -0.02595175, -0.0037763026, 0.019817421, -0.031332742, -0.01459786, 0.054209642, 0.036252506, 0.004931294, -2.9652503e-05, 0.004727585, 0.0059767435, 0.011146339, -0.023230506, 0.009378298, -0.0103545645, -0.03818966, 0.03493032, -0.019725176, -0.035883524, -0.028918983, -0.015235892, 0.0032824045, -0.014152006, 0.033269897, 0.024475822, 0.020509264, -0.008432781, 0.030164298, 0.0016450458, -0.029318715, -0.030333415, 0.028719118, 0.01601998, 0.012683764, -0.025367528, 0.008440468, -0.010731233, 0.0540559, 0.0021389439, -0.011830493, -0.014152006, -0.018433738, -0.015743243, -0.011991923, 0.031440362, 0.03074852, -0.0025982498, -0.030671649, -0.013744588, -0.017019305, -0.042063974, -0.019294696, -0.0404958, 0.035453044, 0.02991831, -0.0074411416, 0.011123277, 0.0066339932, 0.0067762053, -0.028842112, 0.020140281, 0.0202479, 0.081606574, 0.059867367, 0.022507917, -0.0065801833, 0.01580474, -0.04716823, 0.0021158825, -0.024906302, -0.0023445745, -0.0017920622, -0.06899968, -0.023860851, -0.0663553, -0.100978136, -0.030410286, 0.01681944, -0.022907646, 0.069245666, 0.06088207, -0.009024691, -0.047045235, -0.004892858, -0.0009488801, 0.025890253, -0.007183623, -0.03640625, 0.009570477, -0.011315456, 0.0446776, -0.023630237, 0.011722873, 0.05064281, -0.03042566, -0.054117396, -0.081606574, 0.022477169, -0.014259626, -0.01963293, -0.0049966346, 0.006968383, -0.027781287, -0.016327465, -0.0019832796, -0.024921676, -0.0373287, 0.022215806, 0.013429416, -0.06377243, 0.021354847, 0.0032997006, 0.042402208, -0.021262601, -0.003808973, 0.0048006126, 0.03754394, -0.0011684437, 0.04147975, -0.031102128, -0.07189004, 0.041418258, 0.0022331113, -0.026043996, -0.028027276, 0.019709801, -0.016035354, 0.001122321, -0.048551913, 0.02576726, -0.04492359, 0.0020447767, -0.0142211905, 0.015189769, -0.042402208, 0.05024308, 0.022461794, 0.031424988, -0.0529797, 0.020878244, -0.0021312567, -0.060144104, 0.00790237, 0.02771979, -0.005700007, -0.014367246, 0.015474193, 0.014175068, 0.0035745155, 0.03905062, 0.0008451039, 0.043939635, -0.0066685854, 0.032870166, -0.08228304, -0.036744483, -0.017665025, -0.033915617, -0.030733146, -0.00811761, -0.03125587, -0.011077154, -0.0055962307, -0.042709693, 0.017926387, -0.028519252, -0.06463339, -0.019463813, -0.05839144, -0.03406936, -0.034130856, -0.030487157, 0.0072681815, 0.009954833, -0.040803287, -0.03514556, 0.009332175, 0.050519817, 0.062265754, 0.01111559, -0.031916965, -0.02107811, 0.03886613, -0.012014984, 0.022323426, 0.047660206, 0.028288638, 0.0067493003, 0.04317092, -0.045446314, -0.0011694046, 0.0218007, 0.0038224254, 0.017634276, -0.05694626, -0.015274327, 0.03705197, -0.009247618, 0.02303064, 0.031978462, -0.059283145, 0.0063995356, -0.03929661, -0.0067454567, 0.03274717, 0.045200326, -0.023491869, 0.04052655, 0.072873995, -0.018925713, -0.031163625, 0.06321896, 0.057038505, -0.020140281, 0.016804066, -0.06066683, -0.0014768898, 0.019909667, -0.03265493, -0.033362143, 0.0051042545, -0.02713557, 0.02616699, -0.016250594, -0.009163059, -0.066970274, 0.0023810884, 0.025567394, 0.01515902, 0.0058960286, 0.027550673, 0.013291048, -0.013959828, -0.066109315, 0.052702963, 0.004958199, 0.021262601, -0.023937723, -0.007402706, -0.033054657, 0.0031747846, 0.005061975, -0.034130856, 0.022907646, 0.008617273, -0.03594502, -0.009078501, -0.00085903675, -0.028857486, 0.023814728, -0.021708455, 0.0016315933, 0.013644655, -0.019509936, 0.0012962422, -0.050950296, -0.003480348, 0.021447092, 0.019694427, 0.036068015, -0.02713557, -0.0384049, 0.014859222, 0.027412305, 0.03655999, -0.019786673, -0.04550781, -0.006484094, 0.059252396, 0.012683764, 0.015735555, 0.024952425, -0.01548188, -0.009801091, -0.013460165, 0.033331394, 0.019263947, -0.0037609283, 0.018
|
|||
|
"Example framework
|
|||
|
I want to return aT-shirt I bought onAmazon on March 3rd.
|
|||
|
User
|
|||
|
Router
|
|||
|
LLM
|
|||
|
Expected: return
|
|||
|
Predicted: return
|
|||
|
PASS
|
|||
|
Return
|
|||
|
Assistant
|
|||
|
LLM
|
|||
|
Component evals
|
|||
|
Subjective evals
|
|||
|
Expected: return_policy
|
|||
|
Predicted: return_policy
|
|||
|
PASS
|
|||
|
Knowledgebase
|
|||
|
Question: Does this response adhere toour guidelines
|
|||
|
Score:Politeness: 5, Coherence: 4, Relevancy: 4
|
|||
|
PASS
|
|||
|
Sure - because we’rewithin 14 days of thepurchase, I canprocess the return
|
|||
|
Question: I want to return a T-shirt Ibought on Amazon on March 3rd.
|
|||
|
Ground truth: Eligible for return
|
|||
|
PASS
|
|||
|
|
|||
|
This diagram illustrates a framework for processing a return request using a language model (LLM) system. Here's a breakdown of the process:
|
|||
|
. **User Input**: The user wants to return a T-shirt purchased on Amazon on March 3rd.
|
|||
|
. **Router**: The initial input is processed by a router LLM, which determines the nature of the request. The expected and predicted outcomes are both ""return,"" and the process passes this evaluation.
|
|||
|
. **Return Assistant**: The request is then handled by a return assistant LLM. It interacts with a knowledge base to verify the return policy.
|
|||
|
. **Knowledge Base**: The system checks the return policy, confirming that the item is eligible for return within 14 days of purchase. The expected and predicted outcomes are ""return_policy,"" and this step also passes.
|
|||
|
. **Response to User**: The system responds to the user, confirming that the return can be processed because it is within the 14-day window.
|
|||
|
. **Evaluation**: The response is evaluated for adherence to guidelines, scoring 5 for politeness, 4 for coherence, and 4 for relevancy, resulting in a pass.
|
|||
|
The framework uses both component evaluations (red dashed lines) and subjective evaluations (orange dashed lines) to ensure the process is accurate and user-friendly.","[-0.033450663, 0.03469386, -0.026757639, -0.025818013, 0.04724147, -0.008875846, -0.014687067, 0.02425679, 0.028376685, 0.08754417, 0.020744037, -0.06811561, -0.028752536, -0.0009305905, -0.010133498, 0.0018810576, 0.016710876, -0.023967674, -0.02145237, 0.048253376, 0.03478059, 0.026208319, 0.002551444, 0.0023526773, 0.0019171971, 0.006219597, -0.014528054, 0.0076977, -0.0020960872, -0.023158152, 0.035416648, -0.018691316, -0.053688746, -0.029157298, -0.020223629, 0.016840978, -0.025716823, 0.028029747, 0.021611383, 0.023114784, -0.009981712, 0.027147945, 0.025702367, -0.04484181, -0.018344378, 0.05302378, 0.008413261, 0.035821408, -0.037382632, 0.036081612, -0.019587575, 0.025095224, 0.007386901, 0.004867982, -0.022825668, -0.008059095, -0.0031170263, 0.010834603, 0.043425146, -0.00031328373, -0.019775499, -0.029128386, -0.04851358, -0.013089703, -0.027755087, -0.005337795, -0.047848612, 0.025340972, 0.03975338, -0.006942386, 0.029359678, 0.008499996, 0.033306103, -0.02723468, 0.010061219, 0.019269548, 0.072047584, 0.05710031, 0.023114784, 0.0034097559, -0.008832478, -0.037209164, 0.0025080768, -0.006100337, -0.0013886578, -0.018141996, -0.052214257, -0.012590979, -0.06603398, -0.0933843, -0.011232137, 0.031426854, -0.0071086274, 0.03469386, 0.065802686, -0.012005521, -0.047183648, -0.0009974485, -0.006273806, 0.009005948, -0.0066099027, -0.04125678, -0.015829073, -0.0010408157, 0.045448955, -0.00720259, 0.006870107, 0.051607113, -0.024979578, -0.04883161, -0.078870706, 0.031195562, 0.022825668, -0.0038633058, -0.015539957, 0.0010290705, -0.04033161, -0.023996586, 0.0011998293, -0.016436215, -0.028723624, 0.0044632205, 0.010314195, -0.063200645, 0.0067580747, -0.01877805, 0.05042174, -0.021004241, -0.023215974, 0.014412407, 0.05076868, 0.010017851, 0.02723468, -0.024025498, -0.097084984, 0.06048296, 0.020397099, -0.024502538, -0.038799297, -0.011195998, -0.027278047, 0.008659009, -0.017939616, 0.016537406, -0.021105431, 0.014578649, -0.0076471046, 0.004289751, -0.019443016, 0.07569043, 0.016436215, 0.016378393, -0.03547447, 0.030704064, -0.0043439604, -0.084421724, 0.033855423, 9.3171984e-05, -0.0023888168, -0.008854162, 0.0020671757, 0.01611819, -0.005511264, 0.043598615, 0.003196533, 0.015323121, -0.008369894, 0.049178544, -0.06268024, -0.04388773, -0.03402889, -0.015525502, -0.053602014, -0.010646678, -0.036833312, -0.014636472, 0.02268111, -0.03960882, 0.06331629, -0.017115638, -0.045680247, 0.008326526, -0.051751673, -0.06643874, -0.010762325, -0.030761888, 0.0056124544, 0.022088423, -0.045564603, -0.05137582, -0.0032850748, 0.053804394, 0.03307481, 0.013848632, -0.022738934, -0.024994034, 0.021741485, 0.0042716814, 0.035011888, 0.03264114, 0.0045102015, 0.004492132, 0.0383078, -0.013841405, 0.0052655158, 0.039146237, -0.022073967, 0.020165805, -0.042442154, -0.019515296, 0.022825668, -0.017390296, 0.009844382, 0.021365635, -0.063085, -0.0074736355, -0.049959157, 0.007979588, 0.011282732, 0.048600312, -0.04741494, 0.06285371, 0.08898975, -0.023172606, -0.020411553, 0.056984663, 0.044697255, -0.023693014, 0.003780185, -0.053833306, -0.02761053, 0.035590116, -0.03960882, -0.048860516, 0.022912402, -0.031397942, 0.021409001, 0.004553569, -0.010791236, -0.043367323, 0.019920057, 0.02155356, 0.001926232, 0.015612236, 0.028680257, 0.007058032, -0.011499569, -0.054729562, 0.041343514, 0.00090032374, 0.051954053, -0.011832052, -0.0035019114, -0.0505663, -0.014152204, -0.0022894333, -0.032149643, 0.026772095, 0.0041379654, -0.007003823, -0.018387746, -0.008225336, -0.024603728, 0.03307481, -0.01611819, -0.00071375386, 0.014289533, -0.003993408, 0.016031453, -0.01241751, -0.018460024, 0.03599488, 0.028752536, 0.0345493, -0.04409011, -0.04871596, 0.016233835, 0.016407304, 0.053110514, -0.0067327768, -0.032062907, -0.023013594, 0.040071405, 0.005579929, 0.016190467, 0.0322942, -0.013660707, -0.0106177665, -0.031282295, 0.0405629, 0.0063063316, -0.010133498, 0
|
|||
|
"Best practices
|
|||
|
Log everything
|
|||
|
●
|
|||
|
Evals need test cases - log everything as you develop so you can mine your logs for good eval cases
|
|||
|
Create a feedback loop
|
|||
|
●
|
|||
|
●
|
|||
|
Build evals into your application so you can quickly run them, iterate and rerun to see the impact
|
|||
|
Evals also provide a useful structure for few-shot or fine-tuning examples when optimizing
|
|||
|
Employ expert labellers who know the process
|
|||
|
● Use experts to help create your eval cases - these need to be as lifelike as possible
|
|||
|
Evaluate early and often
|
|||
|
●
|
|||
|
Evals are something you should build as soon as you have your first functioning prompt - you won’t beable to optimize without this baseline, so build it early
|
|||
|
● Making evals early also forces you to engage with what a good response looks like
|
|||
|
. **Log Everything**
|
|||
|
- It's important to log all test cases during development. This allows you to mine your logs for effective evaluation cases.
|
|||
|
. **Create a Feedback Loop**
|
|||
|
- Integrate evaluations into your application to quickly run, iterate, and rerun them to observe impacts.
|
|||
|
- Evaluations provide a useful structure for few-shot or fine-tuning examples during optimization.
|
|||
|
. **Employ Expert Labelers Who Know the Process**
|
|||
|
- Use experts to help create evaluation cases, ensuring they are as realistic as possible.
|
|||
|
. **Evaluate Early and Often**
|
|||
|
- Build evaluations as soon as you have a functioning prompt. This baseline is crucial for optimization.
|
|||
|
- Early evaluations help you understand what a good response looks like, facilitating better engagement.","[-0.0053138603, 0.033364683, 0.041536734, -0.006101976, 0.05098059, 0.0013876583, -0.017710613, 0.019997163, 0.018644175, 0.07035538, 0.07506377, -0.044134468, 0.009382972, -0.027019171, 0.007569968, 0.01361106, 0.021796636, -0.019090662, -0.025057338, 0.015532303, 0.016709402, -0.007759386, 0.009254438, 0.018224748, 0.002741492, -0.03628714, -0.0010925378, 0.05677138, 0.004684721, -0.037613068, 0.040129624, -0.010898318, -0.04178027, -0.006720968, -0.015248175, 0.045541577, 0.0011018396, -0.006014032, 0.012914271, -0.008219402, -0.0070896572, 0.021038964, -0.0139898965, 0.047029864, 0.011026853, -0.0019381554, 0.015329354, -0.01925302, -0.018224748, 0.06093858, -0.038966056, 0.041076716, 0.036016542, -0.030090453, -0.0066093463, -0.002619723, -0.050412335, -0.027655074, -0.0033993823, 0.033418804, 0.0044750078, -0.0068393545, 0.0033198944, 0.02133662, -0.011223036, -0.024150835, -0.04080612, -0.018157098, 0.016452335, 0.026599744, 0.078365065, 0.013922247, -0.0049079643, 0.035610646, -0.004914729, -0.02814215, 0.029224541, 0.06689173, -0.008368231, -0.019577736, -0.00621698, -0.038966056, 0.013374287, -0.027668605, -0.008632064, -0.008388526, -0.08264051, -0.027181529, -0.03723423, -0.027195059, -0.033283506, 0.019523617, -0.010634486, 0.06878591, 0.038127203, 0.053740684, -0.008435881, -0.0067311153, 0.03723423, 0.008584709, 0.033716463, -0.033012908, -0.024407905, 0.022879027, 0.035881244, -0.019970104, -0.02030835, 0.044567425, -0.022757258, -0.037667185, -0.07187072, -0.01803533, -0.056825496, -0.016005848, 0.018671235, 0.008158518, -0.022851968, -0.050304096, -0.0061188885, -0.068461195, -0.009775339, 0.011175681, -0.016262917, -0.038776636, 0.019997163, -0.07116717, 0.027425067, -0.02247313, 0.038803697, -0.027289769, 0.004613689, -0.0051785614, 0.07149189, -0.05539133, -0.022405481, 0.015951728, -0.0236367, -0.0006084218, -0.034420013, 0.023406692, 0.020998374, -0.009234143, -0.06407751, 0.01463933, -0.0295222, -0.03057753, -0.03869546, 0.048247553, -0.009125904, 0.015978789, 0.027695665, 0.033689402, -0.060289145, -0.0071505415, 0.028169211, -0.018671235, -0.016046438, 0.024894979, -0.016249387, -0.05303713, 0.039723728, -0.00056064443, -0.013550175, 0.0063150716, -0.0016032908, -0.019455967, -0.03390588, -0.0078473305, -0.051197067, 0.017724143, -0.0015990627, -0.03490709, -0.029792797, 0.0019110956, 0.016330566, -0.013638119, -0.020524828, -0.03363528, -0.01922596, -0.0121160075, -0.04494626, -0.015505243, -0.034284715, 0.016655283, -0.03609772, -0.016032908, -0.015112876, -0.00042767107, -0.05533721, -0.058124367, -0.017751202, -0.035827123, 0.02603149, -0.0035888008, 0.018806534, -0.027763315, 0.0500335, -0.004447948, -0.029549258, 0.015018167, -0.009017665, 0.01131098, 0.021133672, -0.046651028, 0.04207793, -0.006900239, -0.025693243, 0.011811585, -0.030144572, -0.027844494, 0.022933148, -0.026356207, 0.063861035, 0.046975743, -0.03534005, 0.019631857, -0.03834368, 0.04516274, 0.032228176, 0.033418804, -0.046569847, -0.02480027, 0.0590444, -0.05769141, -0.026220908, 0.04169909, 0.04987114, -0.031145785, 0.0057704938, -0.06835295, -0.0012870298, 0.00082194025, -0.021796636, -0.010850964, -0.0033858526, -0.0024911892, 0.013475761, 0.034068238, 0.008577944, -0.037748367, 0.013678709, 0.008388526, -0.061479777, -0.03279643, 0.0070693623, 0.042754423, -0.054633655, -0.057041977, 0.04072494, 0.027479187, 0.04951936, -0.0607221, -0.012562494, -0.03482591, 0.030712828, -0.048869926, 0.025666183, 0.00239648, 0.0011914751, -0.018346518, -0.04286266, 0.011250095, -0.007860861, 0.05398422, -0.007827036, 0.01135157, -0.017142357, -0.01707471, 0.017656494, -0.02930572, -0.03837074, 0.00070862746, 0.01922596, 0.047192223, 0.013144279, -0.014977577, 0.026694454, -0.0013876583, -0.015951728, -0.009416796, -0.06786588, -0.024083186, 0.04156379, -0.017155888, -0.0029309103, 0.00023021938, -0.017561784, -0.007360255, -0.016398216, 0.02033541, -0.007448199, -0.02033541, 0.023068447, -0.0385331, 0.016506454, 0.005374745
|
|||
|
,"[0.015368387, -0.034810703, -0.009328825, 0.014480682, 0.0073433784, 0.014409349, -0.052247763, 0.049235906, -0.013592978, 0.015106832, 0.008250898, 0.03281337, -0.04172212, -0.015447646, 0.020306244, 0.06340747, -0.045526568, 0.027027437, -0.007763453, 0.01865765, 0.07437697, 0.014821498, -0.016676167, -0.030736774, 0.040105227, -0.014940387, 0.0031347072, -0.011730383, 0.027534697, -0.058905546, 0.044797383, -0.04248301, 0.003695467, -0.018150391, -0.01840402, 0.05646436, 0.024728917, 0.003093096, 0.025759287, 0.026868919, -0.0035904483, 0.028866254, -0.028454104, 0.03706167, 0.024237508, 0.02017943, -0.03197322, 0.023603434, 0.020797653, 0.05478406, -0.037442114, -0.031434257, -0.03230611, 0.07995683, -0.038012784, 0.0055045616, -0.023222988, 0.015201943, 0.003400226, -0.0066934517, -0.01643839, -0.02553736, 0.035349667, -0.005599673, -0.009994604, 0.020005058, 0.001957706, 0.037442114, 0.03842493, 0.015447646, -0.026187288, 0.04181723, -0.029516181, -0.0037331153, -0.029817365, 0.046192348, -0.03171959, 0.012348606, 0.00638434, 0.009519047, -0.02171706, 0.016834686, -0.010596975, -0.023952175, -0.021304913, -0.051169835, 0.006178266, -0.006951045, -0.005112228, -0.045780197, -0.0072601563, -0.0069470815, -0.016279869, -0.018847873, 0.065499924, 0.002686892, 0.010882308, 0.0012047421, -0.014227052, 0.032845072, 0.014385572, -0.04809457, -0.03962967, 0.012198013, 0.022969358, 0.07589875, 0.002785966, -0.010264086, -0.025299583, 0.04486079, -0.021162245, -0.050187018, 0.000848075, 0.019307576, -0.0047119684, 0.0070620077, 0.025584918, -0.10202263, 0.018102834, -0.029833218, -0.02493499, -0.009384306, 0.031656183, -0.028676031, -0.004597042, 0.02349247, -0.028057808, 0.010715864, -0.0034715594, -0.014195349, 0.023222988, -0.025473954, 0.028279735, -0.024364322, -0.041341674, 0.03468389, -0.02772492, -0.043656047, -0.010818901, 0.022271877, 0.03401811, -0.016034165, 0.031751294, -0.006752896, 0.0330987, 0.009170306, 0.002904855, -0.019529503, 0.004846709, -0.035000928, 0.030245366, 0.006087118, -0.017658982, 0.008025009, -0.006455674, -0.069558, 0.012372384, -0.005698747, -0.047872644, 0.0064715254, -0.017769946, 0.004616857, -0.028200475, -0.009653788, -0.046667904, 0.009844011, -0.061695475, 0.021669505, -0.09993018, 0.018134538, -0.023460766, 0.031656183, -0.061188214, 0.038900487, 0.02070254, -0.026932325, 0.007279971, -0.059793252, -0.064041555, 0.008813639, 0.014480682, 0.06213933, -0.046255756, -0.002498651, -0.027788326, 0.0116907535, -0.04061249, 0.03411322, 0.027106697, -0.039217524, -0.010890234, 0.02136832, 0.01251505, 0.02407899, 0.035476483, -0.051106427, -0.010739641, 0.005789895, -0.04876035, -0.0049933386, -0.036522705, -0.05272332, 0.042958565, -0.034271743, 0.00069401466, -0.048316497, -0.023460766, 0.03019781, 0.019624613, -0.028168771, 0.018055279, -0.03240122, 0.02273158, -0.008195416, -0.04885546, -0.007910083, 0.0007831814, 0.02230358, 0.0031148924, 0.01840402, -0.07063593, -0.0045693014, 0.067719184, 0.028818699, 0.038266413, 0.051867317, -0.01594698, -0.039376043, -0.0038599302, -0.068670295, -0.02273158, 0.011857199, -0.023809507, -0.05462554, 0.0017050667, -0.005960303, 0.032369517, 0.02357173, 0.010065937, -0.05503769, -0.023698544, -0.018879576, 0.008583787, 0.025220323, 0.016723722, 0.03018196, 0.03060996, 0.002478836, 0.0003784634, 0.021954838, 0.00028236143, -0.0029365588, -0.040771008, 0.009685492, 0.04061249, -0.02442773, -0.024459435, -0.001542585, 0.004751598, -0.013220459, -0.044733975, -0.013085718, -0.01284794, 0.010478086, -0.038615152, -0.014948313, 0.012015717, 0.02934181, 0.021986542, -0.0037846337, -0.016596908, -0.05462554, 0.02247795, -0.011231049, -0.05893725, -0.023032766, 0.053737838, 0.029405218, 0.0033130406, 0.04977487, -0.034461964, -0.025711732, -0.009867788, -0.0070104892, -0.0071095633, 0.031909812, -0.0016198629, -0.024269212, -0.035476483, 0.0012562607, 0.029738106, -0.062202737, 0.04137338, -0.011429198, -0.013878312, 0.045938715, -0.013537496, -0.042768344, 0.005445117, 0.024443582, 0.058747027, 0.038266413, -0.014900757, 0.0023361691, -0.03121233, 0.07989342
|
|||
|
"## Overview
|
|||
|
Evaluation is the process of validating and testing the outputs that your Large Language Model (LLM) applications are producing. Strong evaluations, referred to as ""evals,"" contribute to creating a more stable and reliable application that can withstand changes in code and model updates.
|
|||
|
### Example Use Cases
|
|||
|
- **Quantify a solution’s reliability**: Measure how dependable your application is.
|
|||
|
- **Monitor application performance in production**: Keep track of how well your application performs in real-world scenarios.
|
|||
|
- **Test for regressions**: Ensure that new updates do not negatively impact existing functionality.
|
|||
|
### What We’ll Cover
|
|||
|
- **What are evals**: Understanding the concept and importance of evaluations.
|
|||
|
- **Technical patterns**: Exploring common methods and strategies used in evaluations.
|
|||
|
- **Example framework**: Providing a structured approach to implementing evaluations.
|
|||
|
- **Best practices**: Sharing tips and guidelines for effective evaluations.
|
|||
|
- **Resources**: Offering additional materials for further learning and exploration.","[0.0067957775, 0.03168953, 0.027472293, -0.016664114, 0.018579945, 0.01977282, 0.014338609, -0.0070909844, 0.023447841, 0.0578846, 0.030701492, -0.052390143, -0.027520489, -0.0128565505, -0.020676514, 0.011627527, 0.0136759, -4.7749865e-05, -0.014254264, 0.05711345, 0.021459715, 0.012603517, 0.046389617, 0.01624239, 0.011416665, -0.06443939, 0.018242566, 0.054655403, -0.014230166, -0.0530649, 0.028894104, -0.011278098, -0.028436232, 0.0135554075, -0.014796481, 0.009308047, 0.014254264, -0.011778143, 0.019170359, 0.025303427, 0.00901284, 0.01944749, -0.008548943, 0.047257163, -0.013169832, 0.0052986583, -0.0008600153, -0.045401577, -0.017073788, 0.029303778, 0.010452725, -0.0048618726, 0.02542392, -0.056342296, 0.021544062, -0.03279806, -0.03366561, 0.0038557602, -0.010494897, -0.0014511817, -0.001011384, -0.028556725, 0.01994151, 0.0037352678, -0.039473347, -0.04053368, -0.047546346, -0.008542919, -0.014832628, -0.02430334, 0.067909576, -0.006964467, 0.015386893, 0.024038255, 0.0010904572, 0.008892347, 0.047401752, 0.07128337, -0.0023661717, -0.042606153, 0.009657474, -0.013567457, 0.0020046942, 0.0022035067, 0.03988302, 0.015567632, -0.055571146, -0.038340718, 0.003632849, -0.009856287, -0.049498323, 0.033858396, 0.013965081, 0.066897444, 0.031135265, 0.034557253, -0.0176883, -0.011790192, 0.033762, 0.037882846, -0.043762878, 0.015170007, 0.028484428, -0.01996561, 0.0402204, -0.014374756, -0.0033828272, 0.009464687, -0.007886235, -0.025496215, -0.07504273, 0.030195422, -0.04311222, -0.01995356, 0.0041238563, 0.015880913, 0.00050343276, -0.026339663, -0.0039943266, -0.0594751, -0.01030211, 0.026146874, 0.005825813, -0.03713579, 0.026677042, -0.025014244, 0.025664905, 0.04296763, 0.022375459, -0.005425175, 0.028195247, 0.0051570795, 0.035448898, -0.049932096, -0.033400524, 0.007862137, -0.02624327, 0.020218642, -0.024652768, 0.0069102454, 0.054077037, 0.008892347, -0.018929373, 0.023291202, -0.010356331, -0.008898372, -0.015724273, 0.029183285, 0.019013718, 0.009735795, 0.033689704, 0.016917149, -0.07615127, -0.00010863153, -0.018724537, -0.0530649, -0.020182496, 0.009356244, 0.04761864, -0.0659335, 0.05325769, 0.03253298, -0.01384459, 0.019170359, 0.008814027, 0.0020769897, -0.013121635, -0.005268535, -0.020640368, 0.0030966576, -0.04407616, -0.033352327, 0.0044642473, -0.008795953, 0.030532802, -0.034822334, -0.010946744, -0.03713579, -0.0136759, -0.025833594, -0.045401577, 0.012470975, -0.06868073, 0.007446437, -0.02060422, 0.0014519347, 0.0018796831, 0.02205013, -0.066174485, -0.056245904, -0.020869303, 0.031279854, 0.030340014, 0.043497797, 0.013627702, 0.0077356193, 0.027086716, 0.024026206, -0.026146874, 0.029038696, 0.03154494, 0.019013718, 0.058655754, -0.01964028, 0.051040627, 0.020471677, 0.006584916, 0.012784256, -0.048293397, -0.025038343, -0.0037684033, -0.017616006, 0.044293046, 0.01069371, -0.020483727, 0.03426807, -0.0025499228, 0.02460457, 0.0434496, 0.03120756, -0.015796568, -0.04458223, 0.056197707, -0.030846082, -0.050124884, 0.03328003, 0.048293397, -0.05099243, 0.028412133, -0.08116376, 0.010928671, 0.00050719816, -0.037352677, -0.00868751, -0.037400875, -0.044991903, 0.021688651, 0.01335057, 0.0007756705, -0.021604307, 0.029159186, 0.015820667, -0.030460507, -0.004199164, 0.007687422, 0.057643615, 0.0052052764, -0.058029193, 0.06289709, 0.034701843, 0.013507211, -0.026797535, -0.0021312113, -0.017543709, 0.022977922, -0.05320949, -0.0105551435, -0.015579682, 0.027231308, -0.029617058, -0.035617586, -0.00884415, -0.031641334, 0.006663236, -0.005337818, 0.019652328, -0.008771854, -0.012097448, -0.010741907, -0.044799116, 0.007832013, -0.035738077, -0.0018525723, 0.01414582, 0.0169051, -0.020857254, 0.023351448, 0.024869654, 0.02655655, -0.032773964, -0.02539982, -0.023062266, 0.032291993, 0.0065367185, 0.0077416436, 0.0016040566, -0.012236014, -0.02862902, -0.030701492, 0.028243445, 0.035738077, 0.0031087068, 0.06255971, -0.020435529, 0.013495161, 0.025182934, 0.053787857, -0.0020694588, -0.0040967455, -0.00047782
|
|||
|
"**Technical Patterns**
|
|||
|
three types of evaluation methods used in technical assessments:
|
|||
|
. **Metric-based Evaluations**:
|
|||
|
- These evaluations use comparison metrics such as BLEU and ROUGE. - They provide a score that helps in filtering and ranking results, making it easier to assess the quality of outputs quantitatively.
|
|||
|
. **Component Evaluations**:
|
|||
|
- This method involves comparing the ground truth to predictions.
|
|||
|
- It results in a simple Pass/Fail outcome, which is useful for determining whether specific components meet the required standards.
|
|||
|
. **Subjective Evaluations**:
|
|||
|
- These evaluations rely on a scorecard to assess outputs subjectively.
|
|||
|
- The scorecard can also include a Pass/Fail option, allowing for a more nuanced evaluation that considers qualitative aspects.","[-0.030297088, 0.03230851, 0.032937083, -0.029241089, 0.03522508, 0.016217113, 0.007743986, -0.027858235, 0.027983949, 0.025997667, 0.005182562, -0.043547347, -0.012986261, 0.010289695, 0.007379415, 0.030825086, -0.0051039904, -0.022339387, -0.034395363, 0.037890214, 0.043044493, 0.016921112, 0.017964538, 0.008139985, 0.048148483, -0.026425093, -0.02486624, 0.039247926, -0.0077314144, -0.002930709, 0.009107983, -0.0073919864, -0.0059714178, -0.031730227, 0.032861654, 0.021308532, -0.03597936, 0.027481092, 0.031679943, -0.013740546, 0.024489097, 0.037890214, -0.040379353, 0.03597936, -0.033414796, -0.019535964, 0.026500523, -0.03826736, -0.03354051, 0.020415962, -0.018643394, 0.058482178, 0.06245474, -0.039247926, 0.03238394, -0.0033534223, -0.075529, -0.021170247, 0.012885691, -0.030347373, 0.04420106, -0.0015777113, 0.025293667, -0.020441106, -0.034294795, -0.0116411215, -0.0136022605, -0.039398786, 0.007479986, 0.002558281, 0.072210155, 0.042742778, 0.047444485, 0.008969698, 0.011741692, -0.014934829, 0.037638787, 0.049757622, -0.004946848, 0.010943408, 0.0029024233, -0.010974837, -0.009793125, -0.03469708, 0.008762269, 0.00051935617, -0.07743986, -0.04857591, -0.025079954, -0.031730227, -0.08613927, 0.06029246, 0.011571978, 0.04322049, 0.014645687, 0.014369116, -0.05061248, 0.008095985, -0.018391967, 0.035878792, -0.025695952, 0.035903934, -0.011465122, 0.023697099, 0.06522045, 0.0054214187, 0.014067402, -0.004569706, 0.0027767092, -0.019623963, -0.036255933, 0.0230811, -0.06632674, 0.015110829, 0.033037655, -0.0069645587, 0.0023602813, -0.01698397, -0.007857128, -0.01717254, -0.017901681, 0.025130238, 0.030674228, -0.040479925, 0.021924531, -0.018115396, -0.031730227, 0.0076622716, -0.009591983, -0.010591409, -0.0046357056, -0.007819414, 0.05091419, -0.061801028, 0.006939416, 0.0029322803, 0.002495424, 0.013162262, -0.04696677, 0.011439979, 0.045156486, -0.0006383917, -0.025532525, 0.067483306, 0.00156514, -0.028863946, -0.019850248, 0.008730841, -0.019473108, 0.055062756, -0.020378249, -0.0004011064, -0.041561067, -0.028662805, -0.01905825, -0.037412502, -0.0046954197, -0.007963985, -0.013363404, -0.042742778, 0.033037655, -0.01619197, -0.0037337074, 0.033439938, -0.0019689964, 0.012332548, -0.008070842, -0.01297369, -0.04357249, 0.01762511, 0.02254053, -0.05189476, -0.01216912, -0.02773252, 0.034847934, -0.0071531297, -0.019900534, -0.065522164, -0.033138223, -0.004968848, -0.033942793, 0.03522508, -0.04955648, 0.009057698, -0.02505481, -0.05787875, 0.00863027, 0.03228337, -0.037714217, -0.02584681, -0.026098238, 0.01995082, 0.053906187, 0.0078697, -0.02039082, -0.020906247, -0.002746852, 0.0122948345, -0.012363977, 0.020654818, 0.03381708, -0.04417592, 0.06265588, 0.020969104, -0.010553694, 0.004478563, -0.0121125495, -0.013853689, -0.059588462, -0.06029246, -0.017222825, 0.003554565, 0.014180545, 0.067030735, -0.0636616, 0.019271964, -0.025746237, 0.042717636, 0.0060971314, 0.037689075, -0.012106263, -0.035375934, 0.033490226, 0.017147398, -0.028486805, 0.0142559735, 0.040505067, -0.03648222, 0.04553363, -0.11585807, 0.024991954, -0.019397678, -0.040153068, 0.013023976, -0.022678815, -0.028964518, 0.014268545, 0.0018212823, -0.031126799, -0.02843652, 0.016455969, 0.02335767, 0.0007138201, 0.014507402, -0.018781679, 0.018316537, -0.010314838, -0.023407957, 0.0156514, 0.005075705, 0.0018558537, -0.034294795, -0.010842837, 0.01038398, 0.024049098, -0.037689075, -0.0017929967, 0.02790852, 0.0005786775, -0.034671936, -0.048550766, 0.027179379, -0.0384685, 0.00054017757, -0.054861613, 0.03514965, 0.01726054, -0.009415982, -0.009415982, -0.057526752, 0.005141705, 0.032006796, 0.036733646, 0.010132553, -0.023822812, -0.039675355, 0.01699654, 0.02155996, -0.01395426, -0.022251388, -0.019435393, -0.0064082737, 0.07165701, 0.009321697, -0.00081321277, -0.008774841, 0.019598821, -0.0063988455, 0.0006992844, -0.004227135, 0.03560222, -0.0389965, 0.045231916, -0.038669642, -0.0016091398, -0.0152
|
|||
|
"Technical Patterns: Metric-based Evaluations
|
|||
|
ROUGE is a common metric for evaluating machine summarizations of text. It is specifically used to assess the quality of summaries by comparing them to reference summaries. an example of how ROUGE is applied:
|
|||
|
- **Original Text**: This is a detailed description of OpenAI's mission, emphasizing the development of artificial general intelligence (AGI) that benefits humanity. It highlights the importance of safety, broad distribution of benefits, and avoiding harmful uses or power concentration.
|
|||
|
- **Machine Summary**: This is a condensed version of the original text. It focuses on ensuring AGI is safe and accessible, avoiding harm and power concentration, and promoting research and collaboration in AI.
|
|||
|
- **ROUGE Score**: The score given is 0.51162, which quantifies the similarity between the machine-generated summary and the original text. A higher score indicates a closer match to the reference summary.
|
|||
|
Overall, ROUGE helps in evaluating how well a machine-generated summary captures the essence of the original text.","[-0.017632404, 0.043704472, 0.01891783, -0.006118756, 0.0073619834, -0.0078423945, -0.007323031, 0.0036972219, 0.02791581, 0.031862974, 0.0158406, -0.036017887, -0.051313154, 0.0021991816, 0.03542062, 0.02367001, -0.015295267, -0.027422415, -0.011809037, 0.028980507, 0.010893658, 0.03251218, 0.026279813, 0.034278017, 0.0040899906, -0.0086539015, 0.005881796, 0.00031953052, 0.012607559, -0.011971338, -0.016554724, -0.008348775, -0.004946941, -0.035654332, 0.015918504, 0.0001707206, 0.00030228603, 0.01590552, 0.03051263, -0.007569729, 0.0067257625, 0.002267348, -0.0024702246, 0.031006025, -0.031707168, -0.018229673, 0.04515869, -0.04892408, -0.023085726, 0.042977363, -0.026669336, 0.021267952, 0.013711208, -0.05640292, 0.019696876, -0.010458691, -0.035602394, -7.810746e-05, 0.031914912, -0.015165426, -0.02316363, -0.015879551, 0.006300533, -0.023903724, -0.039653435, 0.0062258746, -0.071308665, 0.011335117, 0.009751057, -0.03552449, 0.040094893, 0.0009202479, 0.020904398, -0.020229224, 0.009478391, -0.023007821, 0.040198766, 0.07374968, -0.015593901, -0.021410776, 0.0071737138, -0.028565016, 0.0006707098, -0.027084827, -0.01169218, -0.020540843, -0.045989674, -0.047521796, -0.060973324, -0.015360188, -0.072399326, 0.03368075, 0.0038140786, 0.033135418, 0.044068027, -0.018541291, -0.018086849, 0.036641125, 0.012893209, 0.05310496, -0.049157795, 0.0064336206, -0.012730908, 0.0035219365, 0.030902153, 0.032044753, 0.039393753, -0.0014168896, 0.0018193966, -0.02652651, -0.036433376, 0.010400263, -0.04061426, 0.020034462, 0.027967745, -0.012964621, -0.014516221, 0.013477493, -0.0091667725, 0.008913583, -0.031213772, -0.0059337327, 0.0019346306, -0.027552254, -0.010257437, -0.054481275, 0.02538391, -0.00422957, 0.009329074, 0.015503013, 0.029525839, 0.018606212, 0.0048592985, -0.03066844, 0.0068491115, 0.0017755753, 0.032304436, 0.014087746, -0.034615606, 0.013854032, -0.0067387465, -0.0057941535, -0.061596557, 0.04705437, -0.030746343, -0.05079379, -0.04289946, 0.015100505, -0.02144973, 0.027084827, -0.0053948928, -0.0362516, -0.07717748, -0.004135435, -0.038095344, -0.04876827, -0.0057941535, -0.027448382, -0.01929437, -0.06756924, 0.019060655, 0.017982975, -0.018904846, 0.0158406, 0.009173265, 0.03713452, -0.030616501, -0.019398242, -0.031135866, -0.03755001, 0.012146623, -0.061233003, 0.012003798, -0.020488907, 0.0011474696, -0.018749038, -0.06497242, -0.023501217, -0.0008788611, -0.0055539478, -0.03786163, 0.011257213, -5.074449e-05, 0.022605315, -0.011607783, -0.03381059, 0.018891862, 0.006193415, -0.019735828, -0.020462938, -0.0072126663, 0.03222653, 0.022228776, -0.013503461, 0.015827615, -0.021904172, 0.042250253, -0.00041163646, 0.0034245558, -0.019696876, 0.024539944, -0.0154770445, 0.011614275, -0.014944697, -0.029344061, -0.01121826, 0.009640693, -0.020956334, -0.07104898, -0.010763817, 0.011464958, 0.047002435, 0.032771863, 0.07374968, -0.0458858, -0.028409205, -0.016970215, 0.054896764, -0.0056318524, 0.034329955, -0.029162284, -0.0026341488, 0.012964621, 0.032927673, -0.037368234, 0.026721273, 0.060246214, -0.051442996, 0.06424531, -0.07660618, 0.04560015, 0.010380786, -0.07754103, -0.009679644, -0.004369149, -0.031265706, 0.034148175, -0.012477717, -0.045704022, -0.0062972875, 0.007219158, 0.019813733, 0.011536371, 0.025280038, 0.0031015764, 0.0054305987, -0.021345856, -0.03051263, 0.037965503, -0.0018486109, 0.015619869, -0.041808795, 0.035057064, -0.018229673, 0.012276464, -0.029395998, 0.0012545885, 0.0139059685, -0.0059954072, -0.011029991, -0.06258335, -0.006154462, -0.044561423, 0.0044502993, -0.0009129444, 0.017892087, 0.004950187, -0.023618074, -0.0015800024, -0.0033726194, 0.0055636857, 0.005949963, 0.03394043, 0.06060977, -0.07987817, -0.016502788, -0.0061869225, 0.020579794, -0.017801197, -0.04604161, 0.021034239, 0.0024247803, 0.07317837, 0.038199216, -0.0021650982, -0.019670907, 0.023760898, 0.011698672, 0.014178635, 0.010952086, 0.03684887, -0.038355023, 0.054273527, -0.04508079, -0.
|
|||
|
"# Technical Patterns: Metric-based Evaluations
|
|||
|
the BLEU score, a standard metric used to evaluate machine translation tasks. BLEU stands for Bilingual Evaluation Understudy and is a method for assessing the quality of text that has been machine-translated from one language to another.
|
|||
|
### Key Elements:
|
|||
|
- **BLEU**: This is a metric specifically designed for evaluating translation tasks. It compares the machine-generated translation to one or more reference translations.
|
|||
|
- **Original Text**: The example given is in Welsh: ""Y gwir oedd doedden nhw ddim yn dweud celwyddau wedi'r cwbl.""
|
|||
|
- **Reference Translation**: This is the human-generated translation used as a standard for comparison: ""The truth was they were not telling lies after all.""
|
|||
|
- **Predicted Translation**: This is the translation produced by the machine: ""The truth was they weren't telling lies after all.""
|
|||
|
- **BLEU Score**: The score for this translation is 0.39938. This score indicates how closely the machine translation matches the reference translation, with a higher score representing a closer match.
|
|||
|
The BLEU score is widely used in the field of natural language processing to provide a quantitative measure of translation quality.","[-0.033726323, 0.013741658, -0.0047673346, -0.007375433, -0.009434922, -0.023258723, 0.04072037, 0.0023557965, -0.028187415, 0.020477535, -0.00021416333, -0.020043341, -0.06618527, -0.0026242342, 0.052807394, 0.049099144, -0.018928519, -0.03431307, -0.055060513, 0.019433122, 0.02081785, -0.014070237, 0.0072756857, 0.034289602, 0.027342496, -0.03536922, 0.0003525994, -0.04079078, -0.029102743, 0.016440703, -0.02541796, -0.0033239322, 0.015548845, -0.032904875, 0.033327334, -0.0074223727, 0.0076570725, 0.017203476, 0.05064816, -0.03504064, -0.024878152, -0.0056855963, 0.003303396, 0.006952974, -0.07008128, 0.0043302067, 0.02327046, -0.012791125, -0.01537282, 0.030065011, -0.004896419, 0.049474664, -0.009030065, -0.026896568, 0.0254649, -0.021381129, -0.028774163, 0.0013077165, -0.0033121973, -0.03543963, 0.0055301078, 0.0005871156, 0.021967877, -0.008836438, -0.006823889, -0.02034845, -0.0026462374, 0.01525547, 0.02553531, -0.02990072, 0.08834091, 0.02581695, 0.041964278, -0.004981498, 0.039452992, -0.014797806, 0.056985047, 0.067546524, -0.0013436548, 0.0028002588, -0.027272087, -0.042785726, -0.0066537317, -0.032787524, -0.006248875, -0.0059672357, -0.029478261, -0.021709707, 0.022566361, -0.02280106, -0.052619636, -0.026145529, 0.0004972696, 0.01266204, 0.0037581264, 0.02348169, -0.031660967, -0.0018438583, -0.013659514, 0.021756647, -0.016370293, 0.01857647, 0.0045737075, -0.038115203, 0.05027264, -0.01815401, 0.04027444, -0.03098034, -0.008314231, 0.006636129, -0.069893524, 0.053558435, -0.021087753, 0.020946933, 0.06247702, -0.04560212, 0.0012651772, 0.010467599, -0.0040691034, 0.034266133, 0.01716827, 0.010491069, 0.03633149, -0.032412007, -0.0036613129, -0.0047409306, 0.005207396, 0.032318126, -0.00052147306, 0.0042011216, 0.027225146, -0.022343395, 0.027929245, -0.018447384, 0.00060508476, 0.0062312726, 0.026708808, -0.013483489, -0.043865345, -0.01796625, 0.028281294, -0.0038256026, -0.0051017813, 0.036425367, -0.073367074, -0.021897467, -0.034688592, 0.023951087, 0.0020668227, 0.020008136, 0.00057281356, 0.010103815, -0.028609874, -0.010449997, -0.013084499, -0.03607332, -0.0023704653, 0.017391236, -0.00091239443, -0.048770566, -0.00023726656, 0.002740117, 0.021615827, 0.025957769, 0.010778576, 0.008155809, -0.011822989, -0.008525461, -0.03156709, -0.002408604, 0.0074223727, -0.0404622, -0.02077091, -0.010408925, -0.0052954084, -0.014868216, -0.011746712, -0.08533675, -0.009411451, -0.0063955626, -0.02539449, 0.037645806, -0.018623408, -0.0012996487, 0.018963723, 0.016487643, -0.031778317, 0.03485288, -0.050178763, -0.02532408, -0.03004154, 0.038490724, 0.064777076, -0.0023499292, 0.010684696, -0.0021724375, 0.044100042, 0.012920209, -0.05501357, 0.063274994, 0.019503532, -0.011077818, 0.051258378, 0.019726496, -0.015830483, -0.014293202, -0.026755746, 0.0012035685, -0.062242318, -0.020477535, -0.010772709, 0.008918582, 0.029055802, 0.031379327, -0.093738995, 0.021803588, -0.042152036, 0.07510385, 0.03576821, 0.031872198, -0.02247248, -0.019374447, 0.0706915, 0.028234355, -0.02541796, 0.006747612, 0.0340549, -0.017743286, 0.014692191, -0.044452094, 0.054450292, -0.0354631, -0.049193025, -0.020970404, 0.008895112, -0.007750952, 0.005846952, 0.027389437, -0.03527534, 0.009874983, -0.026920037, 0.022625035, -0.014105442, 0.03029971, -0.010180092, 0.03090993, -0.046235807, -0.050037943, 0.04607152, 0.031191569, -0.014739131, -0.018635143, 0.024103643, 0.0064307675, 0.0053511495, 0.006178465, 0.0031244375, 0.002511285, 0.03004154, -0.02051274, -0.038467254, -0.013589104, -0.06942412, -0.016722342, -0.03445389, 0.019972932, -0.0049140216, -0.0017279753, -0.00644837, -0.019386182, 0.010496937, -0.021803588, 0.052760456, -0.0032065825, -0.008361171, -0.08064276, -0.01987905, 0.0072287456, -0.010972204, -0.042480618, -0.0112421075, 0.011588289, 0.059472863, -0.004438755, 0.008032592, -0.023669448, -0.015173325, 0.0025875624, -0.018940253, 0.0069705765, 0.029736431, -0.039687693, 0.0440061
|
|||
|
"Technical Patterns: Metric-based Evaluations
|
|||
|
**What they’re good for:**
|
|||
|
- **Starting Point**: They provide a good starting point for evaluating a new solution, helping to establish initial benchmarks.
|
|||
|
- **Automated Testing**: These evaluations serve as a useful yardstick for automated testing, particularly in determining if a change has caused a significant performance shift.
|
|||
|
- **Cost-Effective**: They are cheap and fast, making them accessible for quick assessments.
|
|||
|
**What to be aware of:**
|
|||
|
- **Context Specificity**: These evaluations are not tailored to specific contexts, which can limit their effectiveness in certain situations.
|
|||
|
- **Sophistication Needs**: Most customers require more sophisticated evaluations before moving to production, indicating that metric-based evaluations might not be sufficient on their own for final decision-making.","[-0.010613499, 0.014255387, 0.019575143, -0.002032303, 0.03813576, 0.025480203, -0.034988128, 0.007791037, 0.06035127, 0.033141173, 0.008532421, -0.02848476, -0.02796449, -0.010665527, 0.049009394, 0.012200322, -0.017129876, -0.053951956, -0.041699607, 0.043494537, 0.05780195, 0.040034745, 0.006770008, 0.0056384215, 0.0058465293, -0.010320848, 0.0035313298, 0.016154371, 0.0131303035, -0.04567967, 0.020953858, 0.0027509255, -0.04778676, -0.03334928, 0.021877335, 0.055824924, -0.028744895, 0.022982908, 0.027496247, 0.01360505, 0.0068870685, 0.051454663, -0.027548274, 0.035482384, -0.031736445, -0.019926324, 0.059622895, -0.025337128, -0.04029488, 0.010613499, -0.035924613, -0.0055116056, 0.034415834, -0.07866476, 0.043546565, -0.022670748, -0.03933238, -0.029291177, 0.0069000754, -0.0064025675, 0.007732507, -0.019093893, 0.003115114, -0.027340166, -0.022995915, 0.027001992, -0.0023021929, 0.014697616, -0.0093778595, 0.024504697, 0.043338455, 0.008584448, 0.045107372, 0.009833095, 0.0069195856, -0.006841545, 0.03446786, 0.0658141, -0.00414915, 0.025857398, -0.006519628, -0.021916356, -0.017819233, -0.0014006633, 0.020966863, 0.022371592, -0.049529664, -0.06841545, -0.0013974116, -0.012701081, -0.07153707, 0.048957366, 0.025402162, 0.054836415, 0.022046423, -0.009716035, -0.012200322, 0.040867176, 0.003924784, 0.033479348, -0.023269057, 0.029863473, -0.013110793, 0.036705017, 0.07455463, -0.017767206, 0.017598119, 0.014255387, 0.014346434, 0.0010673655, -0.040633053, -0.013930218, -0.036054682, 0.028770909, 0.00041743505, 0.044977304, -0.022332571, 0.038317855, 0.036809072, -0.0065261316, 0.016778694, 0.019692203, -3.92171e-06, -0.02512902, 0.0015445503, -0.05285939, -0.012239342, 0.0048222486, 0.008506408, -0.0029915501, 0.008252776, -0.0034435343, 0.04986784, -0.0237373, 0.017077848, -0.013878191, 0.01132887, 0.026104527, -0.030487798, -0.0047409567, 0.05197493, 0.008057675, 0.02265774, 0.062172215, 0.0020550648, -0.0041621565, -0.010086726, 0.024673784, 0.0019022357, 0.046798248, -0.002632239, -0.013396942, -0.012766114, -0.05473236, -0.009969666, -0.060663432, 0.0073097874, -0.008792556, 0.01575116, -0.06649045, 0.019171935, -0.0035898602, -0.019380042, 0.0445871, 0.0202645, 0.020576661, -0.017611125, -0.029837461, -0.066334374, 0.0007523586, 0.03579455, -0.05561682, 0.008558434, -0.023503179, 0.02321703, -0.001671366, -0.043286428, -0.06607424, -0.017754199, -0.03035773, -0.029941514, 0.009527436, -0.022813821, -0.009234785, -0.038109746, -0.026156554, -0.043156363, 0.047240477, -0.001671366, -0.03579455, -0.03909826, 0.007069163, 0.017624132, 0.024218548, 0.021812303, -0.025870405, 0.019757237, 0.027184086, -0.0108606275, 0.025441183, 0.020602675, -0.0715891, 0.07221342, 0.037095223, -0.00079381757, -0.021213992, -0.011458937, -0.016570587, -0.0677391, -0.032412793, -0.018118389, 0.019913318, 0.0058010058, 0.07174517, -0.02908307, 0.009202268, -0.015842209, 0.028406719, 0.0052969945, 0.036991168, 0.0029687884, -0.0076414593, 0.042453997, 0.015660115, -0.021161966, 0.01439846, 0.029941514, -0.058270194, 0.024023447, -0.09942352, 0.012421437, -0.036236778, -0.043598592, 0.02389338, -0.037407383, 0.00881857, -0.03228273, -0.0020729492, -0.032881036, -0.050414123, 0.012590524, 0.023464158, -0.03132023, -0.01588123, -0.03483205, 0.0040450958, -0.035378333, -0.00097062794, -0.004653161, 0.028224625, -0.005313253, -0.03451989, -0.026416687, -0.0076284525, 0.030747931, -0.03402563, 0.034597926, 0.03483205, 0.026949964, -0.016063323, -0.035430357, 0.013930218, -0.023125984, -0.0031313726, -0.040555015, 0.01432042, -0.02082379, -0.030097594, -0.00068976363, -0.03566448, 0.059102625, 0.00039020219, 0.04580974, 0.012070254, -0.005527864, -0.034727994, 0.013670083, 0.024946926, -0.024036454, -0.029369218, -0.016609607, -0.0076024393, 0.07939314, -0.0005401861, 0.015868222, -0.026104527, 0.039774608, 0.016063323, -0.0
|
|||
|
"**Technical Patterns: Component Evaluations**
|
|||
|
Component evaluations, also known as ""unit tests,"" focus on assessing a single input/output of an application. The goal is to verify that each component functions correctly in isolation by comparing the input to a predefined ideal result, known as the ground truth.
|
|||
|
**Process Overview:**
|
|||
|
. **Input Question:** - The process begins with a question: ""What is the population of Canada?""
|
|||
|
. **Agent's Role:**
|
|||
|
- The agent receives the question and processes it. The agent's thought process is: ""I don’t know. I should use a tool.""
|
|||
|
- The agent decides on an action: ""Search.""
|
|||
|
- The action input is the original question: ""What is the population of Canada?""
|
|||
|
. **Search Component:**
|
|||
|
- The search component is tasked with finding the answer. It retrieves the information: ""The current population of Canada is 39,566,248 as of Tuesday, May 23, 2023….""
|
|||
|
. **Evaluation Steps:**
|
|||
|
- **Correct Action Check:** Is the agent's decision to search the correct action?
|
|||
|
- **Exact Match Comparison:** Does the retrieved answer match the expected result exactly?
|
|||
|
- **Contextual Relevance:** Does the answer use the context provided in the question?
|
|||
|
- **Number Extraction and Comparison:** Extract numbers from both the expected and retrieved answers and compare them for accuracy.
|
|||
|
. **Final Output:**
|
|||
|
- The final output is the verified answer: ""There are 39,566,248 people in Canada as of 2023.""
|
|||
|
This process ensures that each component of the application is functioning correctly and producing accurate results by systematically evaluating each step against the ground truth.","[-0.053972892, 0.029068692, 0.03786652, 0.03248854, -0.0038680115, 0.027234662, 0.0074671237, 0.018119669, 0.004602313, 0.05176654, 0.046581615, -0.011624719, -0.034474254, -0.04222407, -0.012900266, 0.01321743, -0.0015608219, 0.0056916997, -0.057475477, 0.006839692, 0.046030026, 0.0075636515, -0.018685047, 0.0073361215, 0.004523022, -0.02272543, -0.042334385, 0.06475644, -0.0305304, -0.02684855, 0.05286972, -0.017443974, -0.055434603, -0.012259046, 0.018905682, 0.001500492, -0.012341783, 0.014258552, 0.0148377195, 0.01948485, 0.021222351, 0.036763344, -0.023539022, 0.05193202, -0.025662636, -0.034060564, -0.02917901, -0.05940604, -0.045175064, 0.030337345, -0.04117605, 0.0065432135, 0.018381672, -0.031026829, 0.01159714, -0.003912828, -0.07573304, 0.006001968, 0.032709174, 0.008218663, 0.04387883, -0.00056796335, 0.005336615, 0.027717302, -0.0023028802, -0.0055365656, -0.0048436327, -0.01530657, 0.014520557, 0.0028251652, 0.036735766, 0.041837957, 0.008921937, 0.00022882287, 0.019553797, 0.02781383, 0.018312724, 0.04087268, -0.020615604, -0.04252744, -0.02363555, -0.026296962, 0.021636043, -0.025207575, 0.0180783, 0.0066707684, -0.030695876, -0.0295927, -0.033040125, -0.036818504, -0.08202115, 0.068838194, 8.8717345e-05, 0.04434768, 0.020629395, -0.032102425, -0.029427225, 0.034584574, 0.025207575, 0.031385362, -0.012438311, -0.018685047, -0.030364923, 0.01806451, 0.05786159, 0.024628408, -0.028737739, 0.02591085, -0.021911837, -0.012410732, -0.04760205, -0.0032871203, -0.0482088, 0.03657029, 0.023856185, 0.018753994, -0.011693668, -0.059461195, 0.016740698, -0.00899778, -0.042389546, 0.014437818, -0.033812348, -0.020753501, 0.014658453, -0.03323318, 0.0042575705, -0.016864806, -0.0069086407, -0.018698836, 0.013824176, 0.04032109, 0.023401124, -0.01989854, -0.009832057, -0.016395956, -0.029206589, 0.013700069, -0.048870705, -0.00996306, 0.050387572, 0.007998027, -0.02228416, 0.047795106, -0.022022154, -0.026972657, -0.015499625, 0.035494693, -0.020174334, -0.019402111, -0.0019495192, -0.012065989, -0.05273182, -0.025400631, 0.016464904, -0.044375263, 0.025566109, 0.01668554, -0.00088685023, -0.02272543, -0.0067741913, -0.05411079, 0.010314697, 0.028324049, -0.021456776, 0.010052693, -0.015899526, -0.020574236, -0.049670506, 0.013507013, 0.013134691, -0.061336596, -0.008149714, -0.023897553, 0.00705688, -0.035715327, -0.021498146, -0.049422294, -0.0056813573, -0.024766305, -0.04451316, -0.0046161027, -0.04269292, -0.05193202, 0.004416152, -0.029289328, 0.024793884, 0.020698342, -0.076946534, -0.008577195, 0.00855651, 0.023442494, 0.019333161, -0.01624427, -0.01851957, -0.01573405, 0.030695876, -0.018285144, 0.009376997, 0.019719275, 0.006101943, -0.052924875, 0.0629362, 0.041093312, -0.013072638, -0.0061122854, 0.005929572, 0.0076188105, -0.031026829, -0.03797684, 0.018450622, -0.023056382, 0.025621267, 0.044788953, -0.047298677, -0.005898545, -0.048732806, 0.057199683, -0.012907161, 0.027579404, -0.01316227, 0.009094308, 0.049422294, 0.0015754735, -0.025235156, 0.06519771, 0.060564373, -0.036708187, 0.0047677895, -0.06646636, 0.013962073, 0.009852742, 0.0015590981, -0.0030819983, 0.008004922, -0.02636591, 0.054083213, 0.01201083, -0.02221521, 0.002297709, -0.027165713, 0.026103906, 0.0156651, 0.015030775, -0.0046953936, 0.039273072, -0.008894358, -0.03466731, 0.03651513, 0.027993096, -0.015899526, -0.05419353, 0.014989406, -0.0314681, -0.0036335865, -0.020753501, 0.0015478941, 0.028379207, 0.001122137, -0.034060564, -0.042637758, 0.00881162, -0.05634472, -0.01991233, -0.048898283, 0.045257803, 0.045202643, -0.033536557, -0.017802505, -0.045064747, -0.00018799242, 0.038032, 0.05979215, -0.0052194023, -0.09084656, -0.016368376, -0.0016314941, 0.03108199, 0.006991379, -0.044457998, -0.05879929, 0.020781081, 0.03552227, 0.050663367, 0.0071361708, 0.0046609193, -0.017443974, -0.0110041825, -0.012714106, -0.0063398154, 0.031854212, -0.007867025,
|
|||
|
"**Technical Patterns: Subjective Evaluations**
|
|||
|
Building an effective scorecard for automated testing is enhanced by incorporating detailed human reviews. This process helps identify what is truly valuable. The approach of ""show rather than tell"" is recommended for GPT-4, meaning that examples of scores like 1, 3, and 8 out of 10 should be provided to help the model understand the range.
|
|||
|
**Example Scorecard:**
|
|||
|
- **Role**: You are an evaluation assistant assessing how well the Assistant has answered a customer's query.
|
|||
|
- **Metrics for Assessment**:
|
|||
|
- **Relevance**: Rate the relevance of the search content to the question on a scale from 1 to 5, where 5 is highly relevant and 1 is not relevant at all.
|
|||
|
- **Credibility**: Rate the credibility of the sources from 1 to 5, where 5 is an established newspaper, government agency, or large company, and 1 is unreferenced.
|
|||
|
- **Result**: Determine if the question is answered correctly based on the search content and the user's question. Acceptable values are ""correct"" or ""incorrect.""
|
|||
|
- **Output Format**: Provide the evaluation as a JSON document with fields for relevance, credibility, and result.
|
|||
|
**Example Evaluation**:
|
|||
|
- **User Query**: ""What is the population of Canada?""
|
|||
|
- **Assistant's Response**: ""Canada's population was estimated at 39,858,480 on April 1, 2023, by Statistics Canada.""
|
|||
|
- **Evaluation**: `{relevance: 5, credibility: 5, result: correct}`
|
|||
|
This structured approach ensures clarity and consistency in evaluating the performance of automated systems.","[-0.015168349, 0.02163761, 0.03160302, 0.024046376, 0.015636338, -0.016159385, -0.018224042, -0.008244865, 0.048725914, 0.042697113, 0.030639514, -0.042889815, -0.023069104, -0.052855227, 0.0015932273, 0.011314322, 0.0075084707, -0.0030642955, -0.03361262, 0.0023038134, 0.04613821, 0.0045628925, 0.013991495, -0.014796711, 0.026523964, -0.00917396, -0.020109762, 0.0006473561, -0.014163549, -0.018182749, 0.016531022, -0.015553752, -0.036888544, -0.041210562, 0.014328722, 0.0028371832, -0.00891932, 0.015471166, 0.035346933, -0.0091051385, 0.0026840544, 0.043357804, 0.027143361, 0.044706713, -0.03209854, -0.015333522, 0.030143997, -0.059241902, -0.02798299, 0.040935274, -0.06100374, 0.03763182, 0.011706607, -0.043110047, 0.02663408, -0.005791364, -0.057369944, -0.023124162, 0.028822616, -0.0029696655, 0.0033395833, -0.025725631, 0.01796252, 0.003150323, -0.03341992, -0.013482212, -0.03559469, -0.0043323394, 0.023137927, 0.018361686, 0.06557351, 0.0488085, 0.026441379, -0.0062180595, 0.03182325, -0.01629703, 0.05797558, 0.0367509, -0.012676996, -0.025422813, -0.02459695, -0.029565893, -0.012732053, -0.046000566, -0.0023502682, 0.0062111774, -0.053378273, -0.060343053, -0.028120633, -0.030804688, -0.076585025, 0.019779418, -0.003857468, 0.050542813, 0.018100163, -0.023330627, -0.035952568, 0.01859568, 0.00010226506, -0.0034410956, -0.014232371, 0.006524317, -0.025780687, 0.02613856, 0.067610644, 0.020329993, 0.02004094, 0.040907744, -0.026991954, -0.062490296, -0.05990259, 0.031217618, -0.089193195, 0.0036303557, 0.028216984, -0.020357521, -0.040219523, -0.048202865, -0.0064727007, -0.024830945, -0.032539, 0.025519164, 0.007735583, -0.05643397, 0.0047727996, -0.06661961, -0.008203572, -0.0004026082, -0.011135385, -0.026331263, -0.011541435, 0.004067375, 0.06832639, -0.04280723, -0.009469895, 0.005588339, -0.024321664, -0.0036544434, -0.037273947, -0.000571652, 0.030667044, -0.008905555, -0.039311074, 0.051946778, -0.025643043, -0.020632809, -0.016778782, 0.04451401, -0.07041858, 0.029125433, 0.0030505313, 0.012112657, -0.04525729, 0.0035443285, 0.022848874, -0.029070375, -0.004724624, 0.020329993, -0.034603655, -0.05478224, 0.016338322, -0.03028164, 0.02562928, 0.025519164, -0.0031227942, 0.0383751, -0.04371568, -0.030446813, -0.040026825, 0.007708054, 0.0090500815, -0.05059787, 0.003169249, -0.02337192, -0.005368109, 0.0034256107, -0.0409628, -0.01781111, -0.01548493, -0.018265335, -0.052937813, -0.017852403, -0.036282912, -0.009332251, -0.013117456, -0.04875344, -0.0047108596, 0.03476883, -0.040191997, 0.0021524052, -0.0004933671, 0.011913072, 0.052992873, 0.0048725912, -0.035374463, -0.027583823, 0.032483943, 0.008554564, -0.028409684, 0.027501235, 0.010412755, -0.012683878, 0.019435307, -0.009958531, -0.00016667806, -0.025766924, -0.02337192, -0.029896239, -0.095084354, -0.03207101, 0.014700361, 0.004817534, 0.005942772, 0.052910283, -0.051754076, 0.010281993, -0.038154867, 0.003344745, -0.009290958, 0.013888261, -0.023702266, 0.012477413, 0.03050187, -0.0040295226, -0.03589751, 0.04539493, 0.045835394, -0.026083505, 0.039971765, -0.078456976, 0.01702654, -0.0065484047, -0.03074963, -0.018485565, -0.014741654, -0.028409684, 0.04613821, 0.016544787, -0.03141032, -0.03303452, 0.01388138, 0.034163196, 0.02408767, 0.012387944, -0.014246136, 0.008933084, -0.031905837, -0.049524248, 0.058691327, 0.0013024546, 0.019338956, -0.06595892, -0.0049448544, -0.00024367258, -0.019917062, -0.020151056, -0.002716745, 0.0035202408, 0.015539987, -0.06722524, -0.03515423, 0.032951932, -0.04525729, -0.012842168, -0.047019128, 0.02761135, -0.024239076, -0.027212184, -0.020343756, -0.037108775, 0.021252206, 0.067555584, 0.026014682, 0.029235547, -0.042284183, -0.012257182, -0.027680172, 0.0032157039, -0.022105597, -0.054396838, -0.05216701, -0.014645303, 0.05167149, 0.035236817, 0.024968589, 0.00069252047, -0.008912438, 0.0045284815, -0.004724624, -0.010089292, 0.019517895, -0.02575316, 0.03749418, -0.023564622, 0.0016327999, -0.010034
|
|||
|
"**Example Framework**
|
|||
|
This framework outlines a method for evaluating the effectiveness of a system by grouping evaluations into test suites called ""runs."" These runs are executed in batches, and each run's contents are logged and stored at a detailed level, known as ""tracing."" This allows for investigation of failures, making adjustments, and rerunning evaluations.
|
|||
|
The table provides a summary of different runs:
|
|||
|
- **Run ID 1**: - Model: gpt-3.5-turbo
|
|||
|
- Score: 28/50
|
|||
|
- Annotation Feedback: 18 incorrect with correct search results, 4 incorrect searches
|
|||
|
- Changes: N/A
|
|||
|
- **Run ID 2**: - Model: gpt-4
|
|||
|
- Score: 36/50
|
|||
|
- Annotation Feedback: 10 incorrect with correct search results, 4 incorrect searches
|
|||
|
- Changes: Model updated to GPT-4
|
|||
|
- **Run ID 3**: - Model: gpt-3.5-turbo
|
|||
|
- Score: 34/50
|
|||
|
- Annotation Feedback: 12 incorrect with correct search results, 4 incorrect searches
|
|||
|
- Changes: Added few-shot examples
|
|||
|
- **Run ID 4**: - Model: gpt-3.5-turbo
|
|||
|
- Score: 42/50
|
|||
|
- Annotation Feedback: 8 incorrect with correct search results
|
|||
|
- Changes: Added metadata to search, Prompt engineering for Answer step
|
|||
|
- **Run ID 5**: - Model: gpt-3.5-turbo
|
|||
|
- Score: 48/50
|
|||
|
- Annotation Feedback: 2 incorrect with correct search results
|
|||
|
- Changes: Prompt engineering to Answer step
|
|||
|
This framework emphasizes the importance of detailed logging and iterative improvements to enhance system performance.","[-0.0356574, 0.0484193, 0.0645396, -0.045206923, -0.0051179025, -0.026297696, 0.011374739, 0.039220218, 0.026516723, 0.07295019, 0.032737054, -0.030634407, -0.027538843, -0.029743703, 0.01257208, 0.017638877, 0.02063223, -0.021873375, -0.0116156675, 0.05443521, 0.03764323, -0.042140562, 0.019157456, -0.010885581, 0.00068171776, -0.0039753183, -0.042403392, 0.019011438, -0.009878063, -0.05572016, 0.03262024, -0.0169818, -0.0007081834, -0.024428677, -0.023669386, -0.0018151762, -0.00041934312, 0.026764952, 0.0036230516, 0.0073264125, 0.029072024, 0.025553009, -0.018894624, 0.0027378225, -0.0031046905, -0.030137949, 0.04015473, -0.043542325, 0.009206384, 0.0029677995, -0.030897237, 0.047952045, 0.003584722, -0.037730843, 0.03156892, -0.009177181, -0.032240596, -0.006954069, 0.02318753, -0.008111255, 0.015463221, -0.017536664, 0.014484906, 0.010118991, -0.022092402, -0.010914785, -0.010235805, 0.030079542, 0.023245936, 0.010213902, 0.02174196, 0.026852561, -0.023567175, -0.006158275, 0.03431404, 0.011323634, 0.056859095, 0.042491004, 0.013302166, -0.029422464, 0.04482728, -0.045790993, 0.010498636, -0.025786636, 0.0046396963, -0.019172058, -0.080017425, -0.008374086, -0.049616642, -0.08305458, -0.04900337, 0.017230028, -0.008249971, 0.06267058, 0.05096, -0.0062385844, -0.017127817, -0.00041112967, -0.0028856648, 0.023596378, 0.011900402, -0.022033995, 0.0127911065, 0.00352449, 0.04628745, -0.017084012, 0.035628196, 0.021537537, -0.040534373, -0.038285706, -0.048302487, -0.013521192, -0.045294534, -0.026064068, -0.013214556, 0.0018398167, -0.022807885, -0.010192, -0.016018085, -0.017259233, -0.02794769, 0.011272527, -0.0036960603, -0.031101663, 0.02921804, -0.015988883, 0.024078235, -0.03378838, -0.015550831, -0.000878841, 0.011046201, 0.009790453, 0.044360023, -0.009279393, -0.04059278, 0.008636917, -0.04646267, 0.0071986476, -0.04068039, 0.022180011, -0.019610109, -0.011579163, -0.04035915, 0.050755575, -0.030137949, 0.008344882, -0.013616104, 0.015609238, -0.036299873, 0.038606945, 0.024691507, 0.026385307, -0.061385628, 0.03124768, 0.021493731, -0.0492662, -0.018763209, 0.043045867, -0.017215427, -0.040329948, 0.014170969, -0.011878499, -0.008279175, 0.021712756, -0.0018443797, 0.025757432, -0.016397731, -0.0036321776, -0.075870536, -0.030663611, 0.0288822, -0.046404265, 0.0030791375, 0.008315679, 0.012155931, -0.031802546, -0.06208651, -0.042695425, -0.030196356, 0.015288, -0.059166167, -0.004745559, -0.061560847, 0.027086189, -0.035978638, -0.025114957, 0.01622251, 0.00056901074, -0.012404161, -0.0009929169, 0.016076492, 0.03320431, 0.023041513, 0.027933089, -0.030108744, -0.031130865, 0.030809628, 0.015594636, 0.015404814, 0.034781296, 0.002106298, 0.01502517, 0.026983976, -0.061852884, -0.0034095014, -0.029174235, 0.005658166, -0.010250407, -0.048594523, -0.040271543, 0.015404814, 0.010659255, 0.038110487, 0.0137548195, -0.02394682, -0.006443009, -0.036971554, 0.033262715, 0.049412217, 0.036708724, 0.02590345, 7.9853155e-05, 0.037730843, -0.015857467, -0.0144411, 0.0687449, 0.038840573, -0.021844173, 0.026385307, -0.049236998, 0.019726923, -0.019245066, -0.026370704, 0.003515364, 0.0072826077, -0.031539712, -0.009943771, -0.03516094, 0.003533616, -0.07382629, -9.4340794e-05, 0.022691071, 0.001346096, 0.004230848, 0.01154996, 0.02861937, -0.03159812, -0.07692186, 0.034927312, 0.020603025, 0.007541788, -0.025377788, -0.022997707, -0.045528162, -0.0014163668, -0.022209216, -0.0322698, 0.008439794, 0.013258361, -0.013148848, -0.036066245, 0.0013962894, -0.0475724, 0.0074067223, -0.04371755, 0.014594418, 0.017814098, -0.010914785, 0.012002613, -0.09204924, 0.0050558452, 0.05764759, 0.008797536, 0.007165794, -0.006913914, -0.010943988, -0.0009180831, 0.029013617, 0.0044535245, -0.03787686, -0.033875987, 0.012294647, 0.035014924, 0.038314912, 0.016748171, 0.016660562, 0.014163667, -0.0042235474, 0.021814968, 0.0229393, -0.016675163, -0.015448619, 0.046696298, -0.008943553, -0.033262715, 0.00066529086, 0.0
|
|||
|
"Overview
|
|||
|
Fine-tuning involves adjusting theparameters of pre-trained models on aspecific dataset or task. This processenhances the model's ability to generatemore accurate and relevant responses forthe given context by adapting it to thenuances and specific requirements of thetask at hand.
|
|||
|
Example use cases
|
|||
|
- Generate output in a consistent
|
|||
|
-
|
|||
|
format
|
|||
|
Process input by following specificinstructions
|
|||
|
What we’ll cover
|
|||
|
● When to fine-tune
|
|||
|
● Preparing the dataset
|
|||
|
● Best practices
|
|||
|
● Hyperparameters
|
|||
|
● Fine-tuning advances
|
|||
|
● Resources
|
|||
|
","[-0.027469128, 0.034217127, 0.064389996, -0.044350486, -0.0060891034, -0.02631038, 0.018926207, 0.036330137, -0.022822779, 0.07461424, 0.0408288, -0.010707052, -0.06988837, -0.007168329, 0.020243997, 0.00026483624, -0.0339672, 0.023720238, -7.996563e-05, 0.01190556, 0.016779115, -0.051893704, -0.00094858237, 0.05462017, 0.022629654, 0.0036693665, 0.002040588, 0.063117646, 0.05471105, -0.012348611, -0.0015123356, -0.0204144, -0.049530767, -0.055210903, 0.01818779, -0.0065889554, 0.06575323, -0.019369256, 0.012280449, 0.017994665, -0.016211102, -0.048531063, -0.061663534, 0.073114686, 0.038261384, -0.021266421, 0.008099871, -0.006912723, -0.029468535, 0.057119425, -0.04289637, 0.023992885, -0.036761828, -0.013734564, -0.0014498542, 0.008792847, -0.013745924, -0.010104958, 0.009610787, 0.0047201915, -0.013461918, -0.03526227, 0.014722907, 0.035012346, -0.022288846, -0.026355822, -0.039329246, 0.0024367773, 0.0071456083, 0.0051178006, 0.041442256, -0.028673315, -0.004538427, 0.049939737, 0.01103082, -0.007952187, 0.0014179035, 0.063481174, -0.028196184, -0.01142843, -0.015586288, -0.031354338, -0.038783953, -0.0096278265, -0.025083471, -0.006248147, -0.03642102, -0.036352858, -0.027423687, -0.043169018, -0.004208979, 0.006316309, -0.0072024097, 0.05771016, 0.04662254, 0.03605749, -0.0017892421, 0.027196482, 0.011996442, 0.047258712, 0.017517533, 0.008139632, -0.0314225, -0.01568853, 0.037784252, -0.020266717, -0.037988737, 0.044827618, -0.013109749, -0.01613158, -0.06457176, -0.027173761, -0.05048503, 0.0021300502, -0.0012361391, -0.048076652, 0.009207497, -0.02674207, 0.0033228784, -0.043441664, -0.0062140664, 0.008139632, 0.013109749, -0.024061047, 0.0060834233, -0.037806973, 0.015200038, 0.008281635, 0.0009159216, -0.037579767, 0.041828506, 0.026901115, 0.0078385845, -0.021493627, -0.0056062923, -0.0032461965, -0.034262568, 0.034898743, -0.02242517, -0.004041415, 0.032922056, -0.03094537, 0.02328855, 0.018006025, -0.055801634, -0.016654152, -0.037125356, 0.04489578, -0.021550428, 0.04196483, -0.05689222, 0.02381112, -0.05607428, 0.025378838, 0.02546972, 0.046804305, -0.031695146, 0.0045213867, -0.01313247, -0.033399187, 0.041873947, 0.012621257, -0.00806579, -0.024401855, 0.040101744, -0.013768645, -0.037579767, 0.011530672, -0.065571465, -0.0017139805, -0.0054074875, -0.023833841, -0.0033597993, 0.021402745, 0.032490365, -0.0029025485, -0.03430801, -0.0060834233, -0.01655191, -0.0016742195, -0.047667682, 0.006532154, -0.06552602, 0.017165365, -0.007503457, -0.04839474, 6.137207e-05, -0.040533435, 0.005430208, -0.020289438, 0.0074977768, -0.06343573, 0.04282821, 0.012246368, -0.018585399, 0.003950533, 0.0034506815, -0.016642792, -0.019869108, 0.0016429788, 0.022959102, -0.01018448, 0.019312454, 0.0023842363, -0.0071910494, 0.022606933, -0.0079237865, 0.035921168, 0.0010650251, -0.05212091, -0.0012212287, 0.049939737, 0.037102636, 0.018142348, -0.03776153, 0.014188974, -0.032013234, -0.003135434, -0.014257136, 0.0068900026, -0.02081201, -0.0056460532, 0.052847967, 0.01354144, -0.011047861, -0.021857155, -0.0063049486, -0.014643385, 0.0237884, -0.04453225, 0.019142052, -0.05257532, -0.014279856, 0.00086693047, -0.020232636, -0.017119924, 0.01315519, -0.05048503, 0.026128616, -0.025787808, -0.008287315, 0.0095483055, -0.064708084, -0.019823667, 0.020596165, 0.071433365, -0.010019756, -0.070978954, 0.033830877, -0.01780154, 0.036648225, -0.017699298, -0.013359675, -0.056301486, 0.04875827, -0.05425664, 0.025333397, 0.006895683, -0.010860416, 0.0016060579, -0.053620465, -0.012519015, -0.018119628, -0.0038312504, -0.042987254, -0.011275066, 0.014779708, 0.022254765, 0.0028216066, -0.028809639, 0.014609304, 0.012962066, 0.0004192649, 0.017244887, -0.011598834, 0.02120962, 0.03560308, 0.033262864, -0.031990513, -0.052075468, -0.03015015, -0.020073593, 0.0534387, -0.0007327373, -0.02549244, -0.005185962, -0.0054500885, -0.044327766, 0.0076227398, 0.020164475, 0.031240737, -0.039374687, 0.024447296, 0.016881358, 0.014688826, -0.0107524935, 0.026628468, -0.019482858, 0.00930406, -0.019744145, 0.032104116, 0.011757878, -0.0237429
|
|||
|
"What is Fine-tuning
|
|||
|
Public Model
|
|||
|
Training data
|
|||
|
Training
|
|||
|
Fine-tunedmodel
|
|||
|
Fine-tuning a model consists of training themodel to follow a set of given input/outputexamples.
|
|||
|
This will teach the model to behave in acertain way when confronted with a similarinput in the future.
|
|||
|
We recommend using 50-100 examples
|
|||
|
even if the minimum is 10.
|
|||
|
|
|||
|
Fine-tuning is a process in machine learning where a pre-existing model, known as a public model, is further trained using specific training data. This involves adjusting the model to follow a set of given input/output examples. The goal is to teach the model to respond in a particular way when it encounters similar inputs in the future.
|
|||
|
The diagram illustrates this process: starting with a public model, training data is used in a training phase to produce a fine-tuned model. This refined model is better suited to specific tasks or datasets.
|
|||
|
It is recommended to use 50-100 examples for effective fine-tuning, although the minimum requirement is 10 examples. This ensures the model learns adequately from the examples provided.","[-0.004026966, 0.015703434, 0.050010644, -0.0420376, 0.005716905, -0.03071356, 0.028055878, 0.021226792, -0.024127131, 0.08144062, 0.0440713, -0.032469943, -0.06591052, -0.046636544, 0.027015915, -0.026900364, 0.0030707782, 0.00725085, -0.01982862, 0.037669756, 0.027524343, -0.0017693808, 0.0092210015, 0.043493547, 0.028055878, -0.020822361, 0.030228244, 0.017633142, 0.0148252435, -0.008013489, -0.00046401107, -0.011347147, -0.063322164, -0.059948064, 0.0025926845, -0.00065647636, 0.07857495, 0.0072392947, 0.0025637965, 0.0073432913, -0.0231565, -0.03993456, -0.03651424, 0.085831575, 0.039911453, -0.0017014943, 0.036814675, 0.018245565, -0.0047347182, 0.046313, -0.03140687, 0.015195008, -0.040073223, 0.0043245107, 0.004832937, 0.009059229, -0.02194321, 0.0136350645, -0.0025637965, 0.034596086, 0.012895536, -0.0420376, 0.008793461, 0.05056529, -0.009249889, -0.023052502, -0.068082884, 0.00050084305, -0.011052491, 0.026045283, 0.035150733, -0.04977954, -0.023641815, 0.013542623, 0.045342367, -0.00442273, 0.021007244, 0.033764116, -0.01650074, -0.017240267, 0.036976445, -0.031661082, -0.0026995693, -0.010821388, -0.032077067, -0.024288904, -0.07302848, -0.0129186455, 0.003746754, -0.06383059, -0.033833448, -0.0007084745, -0.02277518, 0.056065537, 0.0281021, 0.006066448, 0.02408091, 0.00166394, 0.0060780034, 0.03808574, -0.0057949023, 0.020360155, -0.007695723, -0.02740879, 0.007609059, -0.042546023, -0.029881591, 0.015125678, -0.024589337, 0.0007008914, -0.025282646, -0.02976604, -0.008111708, -0.0073086256, -0.01369284, -0.04481083, -0.029396275, -0.006106891, -0.0088685695, -0.03163797, -0.0024323568, -0.014178156, 0.023849808, -0.032978367, 0.02111124, -0.010515177, 0.016674066, 0.0058324565, 0.022324529, -0.010873387, 0.036699124, 0.0015946092, -0.004295623, -0.014328373, -0.020198384, -0.030343795, -0.040766533, 0.034041442, -0.038617276, 0.007291293, 0.029350054, -0.04074342, -0.024127131, 0.02558308, -0.04913245, -0.017344264, -0.019817064, 0.046682764, -0.009804536, -0.002358693, -0.0598094, 0.018892653, -0.008978344, 0.04397886, 0.015865207, 0.02814832, -0.005306698, 0.009608098, -0.0057313493, -0.031869076, 0.03253927, 0.016535405, -0.016315857, 0.020348601, 0.0031949962, 0.009544545, -0.023456933, -0.0066153174, -0.057868138, -0.033348132, 0.021434784, 0.004110741, 0.0013266745, 0.0030418904, 0.021088129, 0.023942249, -0.03244683, -0.036907114, -0.024681779, 0.002907562, -0.05139726, -0.022624964, -0.03984212, 0.07339825, -0.0052258116, -0.053384744, -0.006834865, -0.01535678, 0.020001946, -0.038501725, -0.03713822, -0.067759335, 0.011636025, 0.02574485, -0.019135311, 0.012710653, 0.041737165, -0.008943678, 0.0034896522, 0.00808282, 0.017506037, 0.014062605, 0.004000967, 0.001961485, 0.0034347652, 0.016535405, -0.024543116, 0.033255693, -0.013184414, -0.009550323, -0.00036380635, 0.07339825, 0.03374101, -0.009307665, -0.046128117, -0.0021535892, -0.044025082, -0.05444782, 0.016812729, 0.04305445, 0.012826204, -0.019123755, 0.042892676, 0.0454117, -0.0028425644, 0.0004928989, 0.00853347, -0.029350054, 0.0038103072, -0.036791563, 0.0040182997, -0.05324608, -0.012849315, -0.017251823, 0.027015915, 0.012814649, -0.046682764, -0.04977954, 0.017263379, -0.035358727, -0.035682272, -0.00019445134, -0.076957226, -0.028610526, -0.0035272064, 0.0422687, -0.025467528, -0.07159565, 0.04139051, -0.0037063109, 0.03406455, 0.0026923474, -0.018765546, -0.060872473, 0.01818779, 0.041852716, 0.006031783, -0.0030245578, -0.039379913, -0.033694785, -0.044556618, -0.0011974013, -0.00580068, -0.0063437717, -0.028310092, 0.007973046, -0.0021434783, 0.029211393, 0.0052402555, -0.0044082855, 0.02153878, 0.014027939, 0.0036196474, 0.025375087, -0.025421306, 0.04240736, 0.03131443, 0.02898029, -0.0028584525, -0.05375451, -0.050888833, -0.01283776, 0.05116616, 0.03055179, -0.02360715, -0.0058642332, -0.006488211, -0.01937797, -0.019458855, 0.017945131, 0.0
|
|||
|
"When to fine-tune
|
|||
|
Good for ✅
|
|||
|
Not good for ❌
|
|||
|
●
|
|||
|
●
|
|||
|
●
|
|||
|
●
|
|||
|
Following a given format or tone for the
|
|||
|
output
|
|||
|
Processing the input following specific,
|
|||
|
complex instructions
|
|||
|
Improving latency
|
|||
|
Reducing token usage
|
|||
|
●
|
|||
|
●
|
|||
|
●
|
|||
|
Teaching the model new knowledge
|
|||
|
➔ Use RAG or custom models instead
|
|||
|
Performing well at multiple, unrelated tasks
|
|||
|
➔ Do prompt-engineering or create multiple
|
|||
|
FT models instead
|
|||
|
Include up-to-date content in responses
|
|||
|
➔ Use RAG instead
|
|||
|
","[-0.005112491, 0.023727974, 0.036328763, -0.02637444, 0.008533349, -0.025472235, -0.01673589, 0.022013785, -0.010142281, 0.07957442, 0.049079917, 0.014269865, -0.036870085, 0.039215814, -0.00064610987, -0.02610378, -0.019066585, -0.0345845, -0.0058492916, 0.026810506, 0.026133852, -0.037892584, -0.00521023, 0.01595398, 0.040418755, 0.03587766, 0.018825997, 0.038012877, 0.03596788, -0.0013645841, -0.005229026, -0.042072795, -0.024930913, -0.069590025, -0.00903708, 0.009503219, 0.041441254, -0.0047741644, 0.0053004506, -0.016540414, -0.011826395, 0.0042854706, -0.018690666, 0.02835929, 0.020359745, 0.012157204, 0.017788462, -0.009721252, -0.021652903, 0.04288478, -0.043426104, 0.031186197, -0.019833459, -0.005841773, -0.008939342, 0.034734868, -0.033321414, -0.041260812, 0.047395803, 0.003232899, -0.0030468192, -0.039396256, 0.033682294, 0.037080597, -0.036268614, -0.0019002679, -0.081318684, -0.018284675, -0.023111468, 0.0360581, 0.030945608, -0.040779635, 0.031607226, -0.0023964802, -0.017773425, -0.010029505, 0.045501173, 0.06670298, 0.016405081, -0.045170363, 0.0036031785, -0.012307571, -0.01729225, -0.041200664, -0.004883181, -0.00029486106, -0.04823786, -0.044508748, -0.04736573, -0.057921518, -0.026675176, 0.01646523, -0.033652224, 0.035155896, 0.019998863, 0.02425426, -0.012239905, 0.04201265, -0.0068793083, 0.04462904, 0.037471555, -0.019833459, 0.0030261436, -0.03623854, 0.057380196, -0.002278066, -0.016931368, 0.031968106, -0.022073932, 0.009367889, -0.043907277, -0.043095294, -0.07289811, 0.006142508, -0.0013251127, -0.049952045, -0.033922885, -0.005740275, 0.0065973694, -0.03157715, -0.018705703, -0.010781342, 0.007969472, -0.030283993, 0.0021822068, -0.029727632, 0.059425194, -0.006514667, 0.009232557, -0.022013785, 0.02720146, 0.011924134, 0.046373304, -0.0065560183, -0.04712514, -0.00977388, -0.028178848, 0.0065184264, -0.05118506, 0.040599193, 0.027592417, -0.03293046, -0.0021502536, 0.030494507, -0.014781115, 0.014487898, -0.06862768, 0.03047947, -0.027081167, 0.040148094, -0.057951592, 0.04159162, -0.09142337, 0.005510965, 0.027742783, -0.001673777, -0.032990605, 0.010976819, -0.016239678, -0.0790331, 0.02702102, 0.025532383, -0.0023344536, -0.022705477, 0.03001333, -0.030509543, -0.010803897, 0.02909609, -0.053470645, 0.02079581, 0.02402871, -0.034554426, -0.027727747, -0.046192862, 0.0018457597, -0.011901579, -0.034554426, -0.005898161, -0.0060372506, -0.004165177, -0.048989695, 0.02508128, -0.08210059, 0.048779182, -0.024284333, -0.04574176, -0.048628815, 0.011563253, -0.000447343, -0.009540811, -0.021427354, -0.020389818, 0.08167957, 0.036719717, 0.011879024, -0.010037024, 0.04495985, -0.014006723, -0.030133625, -0.019908642, 0.0022611497, 0.023306945, 0.023848267, -0.027607452, -0.01941243, 0.0033212397, -0.045952275, 0.037922654, -0.036118247, -0.034043178, 0.016119383, 0.033772517, 0.012578232, 0.03984736, -0.046734184, 0.018931255, -0.020359745, -0.008428092, -0.0018147464, 0.010495644, -0.031186197, -0.029081054, 0.056357697, 0.030975683, -0.022149116, 0.0360581, 0.035396483, -0.040268388, 0.054763805, -0.06742474, 0.025171502, -0.01747269, -0.024073819, -0.019186879, 0.01314211, 0.02231452, -0.0036727234, -0.048207786, -0.013480436, -0.011367775, -0.021607794, -0.025291795, -0.035637073, -0.045681614, -0.014803669, 0.06273328, -0.025712823, -0.04956109, 0.049651314, 0.014096943, 0.04462904, -0.032719944, -0.01240531, -0.04817771, 0.01651034, -0.021803271, 0.023773083, 0.021156691, -0.019156806, 0.0046087606, -0.046583816, 0.013269922, -0.0012057585, 0.011691065, -0.022434814, -0.0049170135, 0.020765737, 0.017592985, 0.016074274, -0.024600105, 0.025216611, 0.013751098, -0.0035336337, -0.0006663155, -0.015157033, 0.008202541, 0.025953412, 0.022269411, -0.06285357, -0.030885462, -0.029727632, -0.03942633, 0.05819218, 0.030674947, -0.03047947, -0.0006522185, -0.007939398, -0.006123712, 0.035997953, 0.0076537, 0.031065904, -0.04237353, 0.04393735, -0.031486932, 0.029893037, -0.00033997127, 0.0459222, -0.020540185, 0.021171728, -0.028720172, 0.03467472, 0.044568893, -0.023622718, -0.00039706388,
|
|||
|
"Preparing the dataset
|
|||
|
Example format
|
|||
|
{
|
|||
|
""messages"": [
|
|||
|
{
|
|||
|
""role"": ""system"",
|
|||
|
""content"": ""Marv is a factual chatbotthat is also sarcastic.""
|
|||
|
},
|
|||
|
{
|
|||
|
""role"": ""user"",
|
|||
|
""content"": ""What's the capital ofFrance?""
|
|||
|
},
|
|||
|
{
|
|||
|
""role"": ""assistant"",
|
|||
|
""content"": ""Paris, as if everyonedoesn't know that already.""
|
|||
|
}
|
|||
|
]
|
|||
|
}
|
|||
|
.jsonl
|
|||
|
➔ Take the set of instructions and prompts that you
|
|||
|
found worked best for the model prior to fine-tuning.Include them in every training example
|
|||
|
➔ If you would like to shorten the instructions or
|
|||
|
prompts, it may take more training examples to arriveat good results
|
|||
|
We recommend using 50-100 examples
|
|||
|
even if the minimum is 10.
|
|||
|
","[0.0023975314, -0.014139533, 0.029376538, -0.047140285, -0.0018264627, -0.019180251, 0.005918058, -0.007082528, -0.0051810923, 0.05232138, 0.026096882, -0.034838382, -0.01664075, -0.067941226, -0.0049354373, 0.030448489, 0.013271764, 0.02975938, -0.03889648, 0.011816975, 0.019703465, -0.021541094, 0.01916749, 0.0049545793, 0.0029989083, -0.0012290739, 0.0021167826, 0.03764587, 0.00836504, -0.027666524, 0.021770798, -0.014969018, -0.059059348, 0.0007198177, 0.0030100744, 0.004016623, 0.055537228, 0.00014545901, 0.004370749, 0.010477037, -0.029606244, -0.05992712, -0.00051882706, 0.014484089, -0.009035009, 0.008090671, 0.0005084585, 0.0032142554, 0.006489127, 0.061815795, -0.042393077, 0.047395512, -0.029121313, 0.027258161, -0.0036210222, -0.02996356, -0.023289394, 0.023378722, 0.014254385, 0.0027293256, 0.0103749465, -0.051325995, 0.0058893454, 0.020660562, 0.008798924, -0.034532107, -0.060896978, -0.005752161, -0.012314666, 0.044690114, 0.024144402, -0.02539501, -0.02373604, 5.627938e-05, 0.009698597, -0.029784901, -0.005388464, 0.05196406, -0.014267147, -0.08825723, 0.004527075, -0.019767271, -0.0074717477, -0.03134178, -0.015096632, -0.010445134, -0.035757195, 0.0047918726, 0.013833262, -0.060743842, -0.037492733, -0.0319288, -0.04601729, 0.040606495, 0.050636884, -0.04280144, 0.0022332296, -0.032439254, 0.009877255, -0.0015792123, 0.02091579, -0.010272856, -0.05040718, 0.001430862, -0.012486943, -0.008275711, 0.0051140958, 0.0017275625, -0.029861469, -0.0039209127, -0.0832548, -0.019575851, 0.01390983, -0.056200817, 0.025892701, -0.00039061578, -0.01673008, -0.042316508, 0.042469643, -0.0724332, 0.003968768, -0.013424899, -0.010757785, -0.03562958, -0.0030579292, -0.035068084, 0.0034774574, -0.035935853, 0.020316008, 0.016998067, -0.009666693, -0.027947273, 0.05272974, 0.019256819, -0.03670153, -0.017738223, -0.03016774, -0.027717568, 0.005602216, 0.004689782, -0.009220048, -0.0208137, -0.011714884, 0.04777835, -0.024629332, -0.018478379, -0.059110396, 0.04310771, -0.05466946, 0.01886122, -0.003952816, 0.027258161, 0.02616069, 0.041729487, 0.013297287, 0.009858113, -0.008849969, 0.012250859, 0.015262528, -0.08657274, 0.026543528, -0.0009507177, 0.016219627, -0.008218285, -0.010272856, -0.015109393, 0.021655945, -0.0036848288, -0.04165292, -0.024437912, 0.016653512, -0.051223904, 0.034532107, -0.025497101, 0.0036529254, -0.011223573, -0.018184869, -0.011568129, -0.013259003, -0.0146117015, -0.015045586, -0.021745276, -0.028304588, -0.021553855, -0.024540002, -0.031801187, -0.0035093606, -0.029274449, -0.004718495, -0.049667023, -0.013629081, -0.07575115, 0.073505156, 0.0055320286, 0.01664075, -0.028483247, 0.061713703, -0.030601624, 0.009379564, 0.013807739, -0.009679454, 0.07192275, -0.0019269581, -0.044996385, -0.009819829, -0.013794978, -0.053342283, -0.014752076, -0.037339598, -0.03307732, 0.01926958, 0.013348332, 0.039177228, 0.017355384, -0.019371672, 0.021387959, -0.075393826, -0.024680376, -0.02812593, -0.009609268, -0.009041389, 0.023544619, 0.053852733, -0.013565274, -0.042852484, 0.024055073, 0.03647183, -0.049513888, 0.007567458, -0.041474264, 0.047038194, -0.039355885, -0.02013735, -0.06298983, 0.010055914, 0.012857022, -0.012244479, -0.01752128, 0.009794307, 0.027589956, -0.014139533, 0.009137099, 0.019409955, -6.016759e-05, 0.027641, 0.026415914, -0.025484338, -0.06360237, 0.025637476, -0.007376038, 0.07212693, -0.02276618, 0.02404231, -0.07483233, 0.015364619, 0.003161615, -0.010891779, -0.019677943, -0.0418571, -0.025573669, -0.007937536, 0.03889648, -0.023761563, 0.037109893, -0.027207116, 0.027436819, -0.006157333, -0.0121998135, -0.027692046, -0.030601624, -0.017546803, 0.00175149, 0.032924183, 0.04846746, -0.06589941, 0.029810423, -0.015160438, 0.014560657, 0.031112077, 0.015415665, -0.06605255, -0.0035540252, -0.005305515, 0.02733473, 0.013846023, 0.016283434, 0.02170699, -0.022689613, -0.025611952, 0.02151557, 0.008849969, -0.017266054, 0.010138862, -0.0024342202, -0.012659221, -0.035144653, 0.006674166, 0.044792205, 0.015339096, 0.009373183, -0.023914699, 0.025854418, 0.010075055, -0.025675
|
|||
|
"Best practices
|
|||
|
Curate examples carefully
|
|||
|
Datasets can be difficult to build, startsmall and invest intentionally.Optimize for fewer high-qualitytraining examples.
|
|||
|
● Consider “prompt baking”, or using a basicprompt to generate your initial examples
|
|||
|
● If your conversations are multi-turn, ensure
|
|||
|
your examples are representative
|
|||
|
● Collect examples to target issues detected
|
|||
|
in evaluation
|
|||
|
● Consider the balance & diversity of data
|
|||
|
● Make sure your examples contain all the
|
|||
|
information needed in the response
|
|||
|
Iterate on hyperparameters
|
|||
|
Establish a baseline
|
|||
|
Start with the defaults and adjustbased on performance.
|
|||
|
● If the model does not appear to converge,
|
|||
|
increase the learning rate multiplier
|
|||
|
● If the model does not follow the trainingdata as much as expected increase thenumber of epochs
|
|||
|
● If the model becomes less diverse than
|
|||
|
expected decrease the # of epochs by 1-2
|
|||
|
Automate your feedbackpipeline
|
|||
|
Introduce automated evaluations tohighlight potential problem cases toclean up and use as training data.
|
|||
|
Consider the G-Eval approach ofusing GPT-4 to perform automatedtesting using a scorecard.
|
|||
|
Often users start with azero-shot or few-shot prompt tobuild a baseline evaluationbefore graduating to fine-tuning.
|
|||
|
Often users start with azero-shot or few-shot prompt tobuild a baseline evaluationOptimize for latency andbefore graduating to fine-tuning.
|
|||
|
token efficiency
|
|||
|
When using GPT-4, once youhave a baseline evaluation andtraining examples considerfine-tuning 3.5 to get similarperformance for less cost andlatency.
|
|||
|
Experiment with reducing orremoving system instructionswith subsequent fine-tunedmodel versions.","[-0.0036260425, 0.019424789, 0.08275475, -0.011344421, 0.019535227, -0.024001824, -0.0006883192, 0.08491443, 0.011982506, 0.08196942, 0.033033185, -0.029204674, -0.03759795, -0.029597342, -0.006074081, -0.020259209, 0.02071323, 0.0034879951, -0.013780189, 0.016786553, -0.0069759903, -0.0038960017, 0.017351013, 0.039733082, 0.006730573, 0.007098699, 0.01091494, 0.020504626, 0.006730573, -0.029548258, 0.029229216, -0.02309378, -0.050654158, -0.053501, 0.028615672, 0.017645514, 0.021044545, -0.0003790549, -0.00045939075, 0.003282458, -0.002535469, -0.012332226, -0.036395404, 0.06209061, 0.010436377, -0.0059513724, 0.025793372, -0.008853434, -0.014909109, 0.03845691, -0.04493593, 0.04405243, -0.023915928, -0.012835331, -0.012350632, -0.027045, -0.029891843, -0.032296933, -0.0025738152, 0.039193165, -0.023253301, -0.029302841, 0.039782166, 0.03013726, -0.02197713, -0.008080369, -0.032615975, 0.00626428, -0.0065403744, 0.032615975, 0.01744918, -0.023879116, -0.026995918, 0.0055495016, 0.0011925753, 0.001717922, 0.028272089, 0.052617498, 0.008344193, -0.037229825, 0.03634632, -0.04729194, 0.018529017, -0.032861393, -0.037769742, -0.0060311332, -0.057378594, -0.013362979, -0.029180132, -0.044592347, -0.021510838, -0.0124672055, -0.020541439, 0.014406003, 0.06056902, 0.026701417, 0.02913105, -0.009546738, 0.042530842, 0.037205283, 0.022860633, 0.012823061, -0.023633698, 0.03111893, 0.025842456, -0.053599168, -0.013510229, 0.018614912, -0.030750804, -0.009442436, -0.07018939, -0.022063026, -0.046972897, -0.045672182, -0.019559769, -0.025425246, -0.051881246, -0.01189661, 0.015461298, -0.04042025, -0.016995156, 0.0101296045, 0.0047457595, -0.022983342, 0.013841543, -0.062139694, 0.032984104, -0.018185431, 0.02508166, -0.03379398, 0.01238131, 0.009559009, 0.05718226, -0.033376772, 0.010460918, 0.011246254, -0.009080444, 0.0011772367, -0.03352402, 0.008288974, 0.010546814, -0.031217096, -0.023155134, 0.056593258, -0.0701403, -0.02224709, -0.032738686, 0.048101816, -0.05153766, 0.061452523, -0.0074729607, 0.029302841, -0.039340414, 0.020504626, -0.0010790698, -0.008693912, -0.045549475, 0.06596821, -0.005653804, -0.09782339, 0.018467661, 0.030898055, -0.007834951, -0.0061599775, -0.016811093, 0.011148087, -0.020480085, -0.0024188955, -0.06253236, -0.07205456, 0.0072214077, -0.024811702, -0.010252313, -0.006577187, -0.00065917586, 0.01747372, -0.06901138, 0.009405623, -0.003491063, -0.022921989, -0.039340414, -0.014860026, -0.034137566, 0.034309357, -0.044445097, -0.048788983, -0.03941404, -0.009773749, -0.01789093, -0.017780492, -0.0015123849, -0.022774737, 0.0374507, -0.013007124, 0.019657936, -0.02787942, 0.061747026, -0.007834951, -0.0054114545, 0.029253757, 0.00045095454, 0.021596733, 0.0013221864, -0.049328905, 0.06542829, -0.037205283, -0.018946225, -0.0103811575, -0.0642012, -0.0026397712, -0.005880815, 0.035143774, 0.045402225, -0.0015591676, -0.05575884, 0.027118625, -0.02758492, 0.0008742996, 0.025155287, 0.042629007, -0.0031367415, 0.0017624039, 0.029204674, -0.005850138, -0.004362295, 0.01704424, 0.037107114, -0.036665365, 0.0019111882, -0.012025454, 0.008080369, -0.010571356, -0.013105291, -0.018651724, 0.012344496, -0.019203914, 0.0226643, -0.024603097, -0.0098351035, -0.044396013, 0.0061569097, 0.0015829424, -0.026308749, -0.027805794, 0.0012569973, 0.0591456, -0.041156504, -0.09276779, 0.030382678, 0.032198768, 0.027805794, -0.04952524, -0.038137868, -0.006386989, 0.028051212, -0.026775042, 0.022406612, -0.008614152, -0.03857962, -0.021731714, -0.02098319, 0.04577035, -0.0024449711, 0.01844312, 0.0063440404, 0.0059206956, -0.040862, -0.011663463, 0.00060280657, -0.061059855, 0.016025757, 0.020823669, 0.0066262707, 0.036100905, -0.014271024, -0.020197855, 0.02197713, -0.0017670055, -0.03421119, -0.012614456, -0.06940405, -0.022652028, 0.05409, 0.03349948, 0.009012955, 0.0066569475, 0.013731105, 0.008914788, -0.0009578949, -0.020651877, 0.012013183, -0.029327383, 0.0062213317, -0.017424637, 0.03617453, 0.015890779, 0.0320
|
|||
|
"Hyperparameters
|
|||
|
Epochs
|
|||
|
Refers to 1 full cycle through the training dataset
|
|||
|
If you have hundreds of thousands of examples, we would recommendexperimenting with two epochs (or one) to avoid overfitting.
|
|||
|
default: auto (standard is 4)
|
|||
|
Batch size
|
|||
|
Number of training examples used to train a singleforward & backward pass
|
|||
|
In general, we've found that larger batch sizes tend to work better for larger datasets
|
|||
|
default: ~0.2% x N* (max 256)
|
|||
|
*N = number of training examples
|
|||
|
Learning rate multiplier
|
|||
|
Scaling factor for the original learning rate
|
|||
|
We recommend experimenting with values between 0.02-0.2. We've found thatlarger learning rates often perform better with larger batch sizes.
|
|||
|
default: 0.05, 0.1 or 0.2*
|
|||
|
*depends on final batch size
|
|||
|
|
|||
|
**Epochs**
|
|||
|
- An epoch refers to one complete cycle through the training dataset.
|
|||
|
- For datasets with hundreds of thousands of examples, it is recommended to use fewer epochs (one or two) to prevent overfitting.
|
|||
|
- Default setting is auto, with a standard of 4 epochs.
|
|||
|
**Batch Size**
|
|||
|
- This is the number of training examples used to train in a single forward and backward pass.
|
|||
|
- Larger batch sizes are generally more effective for larger datasets.
|
|||
|
- The default batch size is approximately 0.2% of the total number of training examples (N), with a maximum of 256.
|
|||
|
**Learning Rate Multiplier**
|
|||
|
- This is a scaling factor for the original learning rate.
|
|||
|
- Experimentation with values between 0.02 and 0.2 is recommended.
|
|||
|
- Larger learning rates often yield better results with larger batch sizes.
|
|||
|
- Default values are 0.05, 0.1, or 0.2, depending on the final batch size.","[-0.008692349, -0.016153825, 0.07646653, -0.028320936, 0.006034538, -0.022188364, 0.008283874, 0.015424018, -0.011317482, 0.072588734, -0.0008986451, -0.009678136, -0.07341658, -0.014563497, 0.021828907, 0.018811638, -0.00043026038, 0.056990437, -0.047187038, 0.018757174, -0.007891738, -0.014411, 0.004800943, 0.042808183, -0.0035591791, -0.005007904, 0.053679068, 0.040825717, 0.07010521, -0.016360788, 0.014258502, -0.0074179065, -0.07315516, -0.028408077, -0.016840065, -0.028517004, -0.009563763, -0.00016160293, -0.030434113, 0.047884166, -0.013670298, -0.065922424, -0.03707864, 0.04328746, -0.026229544, -0.01172051, 0.0043298355, -0.039082892, 0.02036929, 0.07616153, -0.01718863, 0.007978879, -0.036512222, 0.02923592, 0.051064827, 0.04805845, 0.02363709, -0.0050351354, -0.00040507107, -0.0022765675, 0.0015508436, -0.008812169, 0.0160449, 0.03171945, 0.013169236, 0.0008823061, -0.028691286, 0.026883105, -0.03899575, 0.016676674, 0.04156642, -0.053069077, 0.020848567, -0.037056856, 0.017330235, -0.004841791, -0.024791712, 0.01821254, -0.036446866, -0.025205633, -0.0055525373, 0.0065955105, -0.014530819, -0.019443411, -0.0016216459, -0.03424655, -0.045357067, -0.049060576, -0.011818545, -0.025663124, 0.006987646, -0.050890543, -0.048319872, 0.032939427, 0.018234326, -0.010190091, 0.053548355, -0.049931988, -0.008893863, 0.024377791, 0.04311318, 0.016306324, -0.029780554, -0.0039731003, -0.003768863, -0.032285865, -0.056119025, -0.00174555, 0.012134432, -0.03339692, -0.052938364, 0.008725027, -0.030651966, -0.02000983, -0.0019511491, -0.033571202, -0.07468013, 0.012973167, -0.013942615, -0.026970245, -0.015783476, -0.0060781087, 0.014509033, -0.03333156, 0.0006416462, -0.013452444, 0.020391073, 0.0068896124, 0.0050514746, 0.007848167, 0.01085999, 0.0051168306, 0.018975027, -0.029780554, 0.010081164, -0.0145961745, 0.024443146, 0.026164187, -0.045574922, -0.02241711, -0.008915649, -0.0038532813, -0.0054272716, 0.04296068, -0.06226249, 0.043744955, -0.03352763, 0.049017005, -0.02307067, 0.03265622, -0.014574389, 0.033832625, -0.004465994, 0.001990635, 0.004373406, -0.0020777765, -0.014487248, 0.025358131, 0.0015930526, -0.018245218, 0.0046538925, 0.050106272, 0.014955632, 0.013517801, 0.019378057, -0.0016161996, -0.044006377, -0.02331031, -0.062306058, -0.04801488, 0.03124017, -0.050324123, -0.002618325, -0.038494688, 0.013419767, 0.0050160736, -0.056249738, -0.027536664, 0.016317217, -0.024944209, 0.0036245352, -0.021044634, -0.04123964, 0.05768757, -0.047884166, -0.031022318, 0.0035373939, -0.011894793, 0.014890277, -0.010892668, 0.05193624, -0.022351755, 0.037579704, 0.012014613, -0.028190224, -0.028059512, 0.033941552, -0.039431456, -0.036359724, 0.0056750798, 0.023963869, 0.03246015, 0.04997556, -0.030564826, 0.03450797, -0.047535602, -0.018245218, -0.01702524, -0.019726621, 0.01764612, -0.009590994, 0.030891607, 0.022079438, 0.0017278495, -0.04376674, 0.017776834, -0.047666315, -0.02339745, -0.015315091, 0.028800214, -0.026534539, -0.00840914, 0.0152606275, 0.020903029, -0.010805527, 0.007341658, 0.0022234658, -0.03167588, 0.009955898, -0.022101223, -0.018473964, 0.0063558714, -0.02400744, -0.011415516, -0.013779225, -0.0021240702, -0.003962208, -0.031610522, -0.012896919, -0.070279494, -0.014977418, 0.04879915, -0.048929863, 0.0006249668, -0.027122743, 0.022547822, -0.022656748, -0.031545166, -0.0130385235, 0.015151701, -0.018648246, -0.005887487, -0.019857334, -0.04208927, 0.05568332, -0.024399575, -0.009743491, -0.0023432851, -0.028103083, -0.000526252, -0.024835283, 0.0054109325, -0.011007041, 0.0146397455, -0.0011791313, 0.021578375, -0.04413709, 0.008082359, -0.039431456, -0.060171098, 0.04923486, 0.055814028, 0.022765676, -0.018637355, -0.02045643, 0.019051276, 0.036969714, 0.026490968, -0.032808714, -0.007336212, -0.033375133, -0.022983529, 0.06234963, -0.013594049, 0.013702976, -0.020107865, 0.06940808, -0.019868227, 0.027667375, -0.004697463, -0.008599761, -0.022896387, 0.0025352684, 0.00069440756, 0.015783476, 0.026556324, 0.0094875
|
|||
|
,"[0.015368387, -0.034810703, -0.009328825, 0.014480682, 0.0073433784, 0.014409349, -0.052247763, 0.049235906, -0.013592978, 0.015106832, 0.008250898, 0.03281337, -0.04172212, -0.015447646, 0.020306244, 0.06340747, -0.045526568, 0.027027437, -0.007763453, 0.01865765, 0.07437697, 0.014821498, -0.016676167, -0.030736774, 0.040105227, -0.014940387, 0.0031347072, -0.011730383, 0.027534697, -0.058905546, 0.044797383, -0.04248301, 0.003695467, -0.018150391, -0.01840402, 0.05646436, 0.024728917, 0.003093096, 0.025759287, 0.026868919, -0.0035904483, 0.028866254, -0.028454104, 0.03706167, 0.024237508, 0.02017943, -0.03197322, 0.023603434, 0.020797653, 0.05478406, -0.037442114, -0.031434257, -0.03230611, 0.07995683, -0.038012784, 0.0055045616, -0.023222988, 0.015201943, 0.003400226, -0.0066934517, -0.01643839, -0.02553736, 0.035349667, -0.005599673, -0.009994604, 0.020005058, 0.001957706, 0.037442114, 0.03842493, 0.015447646, -0.026187288, 0.04181723, -0.029516181, -0.0037331153, -0.029817365, 0.046192348, -0.03171959, 0.012348606, 0.00638434, 0.009519047, -0.02171706, 0.016834686, -0.010596975, -0.023952175, -0.021304913, -0.051169835, 0.006178266, -0.006951045, -0.005112228, -0.045780197, -0.0072601563, -0.0069470815, -0.016279869, -0.018847873, 0.065499924, 0.002686892, 0.010882308, 0.0012047421, -0.014227052, 0.032845072, 0.014385572, -0.04809457, -0.03962967, 0.012198013, 0.022969358, 0.07589875, 0.002785966, -0.010264086, -0.025299583, 0.04486079, -0.021162245, -0.050187018, 0.000848075, 0.019307576, -0.0047119684, 0.0070620077, 0.025584918, -0.10202263, 0.018102834, -0.029833218, -0.02493499, -0.009384306, 0.031656183, -0.028676031, -0.004597042, 0.02349247, -0.028057808, 0.010715864, -0.0034715594, -0.014195349, 0.023222988, -0.025473954, 0.028279735, -0.024364322, -0.041341674, 0.03468389, -0.02772492, -0.043656047, -0.010818901, 0.022271877, 0.03401811, -0.016034165, 0.031751294, -0.006752896, 0.0330987, 0.009170306, 0.002904855, -0.019529503, 0.004846709, -0.035000928, 0.030245366, 0.006087118, -0.017658982, 0.008025009, -0.006455674, -0.069558, 0.012372384, -0.005698747, -0.047872644, 0.0064715254, -0.017769946, 0.004616857, -0.028200475, -0.009653788, -0.046667904, 0.009844011, -0.061695475, 0.021669505, -0.09993018, 0.018134538, -0.023460766, 0.031656183, -0.061188214, 0.038900487, 0.02070254, -0.026932325, 0.007279971, -0.059793252, -0.064041555, 0.008813639, 0.014480682, 0.06213933, -0.046255756, -0.002498651, -0.027788326, 0.0116907535, -0.04061249, 0.03411322, 0.027106697, -0.039217524, -0.010890234, 0.02136832, 0.01251505, 0.02407899, 0.035476483, -0.051106427, -0.010739641, 0.005789895, -0.04876035, -0.0049933386, -0.036522705, -0.05272332, 0.042958565, -0.034271743, 0.00069401466, -0.048316497, -0.023460766, 0.03019781, 0.019624613, -0.028168771, 0.018055279, -0.03240122, 0.02273158, -0.008195416, -0.04885546, -0.007910083, 0.0007831814, 0.02230358, 0.0031148924, 0.01840402, -0.07063593, -0.0045693014, 0.067719184, 0.028818699, 0.038266413, 0.051867317, -0.01594698, -0.039376043, -0.0038599302, -0.068670295, -0.02273158, 0.011857199, -0.023809507, -0.05462554, 0.0017050667, -0.005960303, 0.032369517, 0.02357173, 0.010065937, -0.05503769, -0.023698544, -0.018879576, 0.008583787, 0.025220323, 0.016723722, 0.03018196, 0.03060996, 0.002478836, 0.0003784634, 0.021954838, 0.00028236143, -0.0029365588, -0.040771008, 0.009685492, 0.04061249, -0.02442773, -0.024459435, -0.001542585, 0.004751598, -0.013220459, -0.044733975, -0.013085718, -0.01284794, 0.010478086, -0.038615152, -0.014948313, 0.012015717, 0.02934181, 0.021986542, -0.0037846337, -0.016596908, -0.05462554, 0.02247795, -0.011231049, -0.05893725, -0.023032766, 0.053737838, 0.029405218, 0.0033130406, 0.04977487, -0.034461964, -0.025711732, -0.009867788, -0.0070104892, -0.0071095633, 0.031909812, -0.0016198629, -0.024269212, -0.035476483, 0.0012562607, 0.029738106, -0.062202737, 0.04137338, -0.011429198, -0.013878312, 0.045938715, -0.013537496, -0.042768344, 0.005445117, 0.024443582, 0.058747027, 0.038266413, -0.014900757, 0.0023361691, -0.03121233, 0.07989342
|
|||
|
"**Overview**
|
|||
|
Fine-tuning involves adjusting the parameters of pre-trained models on a specific dataset or task. This process enhances the model's ability to generate more accurate and relevant responses for the given context by adapting it to the nuances and specific requirements of the task at hand.
|
|||
|
**Example Use Cases:**
|
|||
|
- Generate output in a consistent format.
|
|||
|
- Process input by following specific instructions.
|
|||
|
**What We’ll Cover:**
|
|||
|
- When to fine-tune
|
|||
|
- Preparing the dataset
|
|||
|
- Best practices
|
|||
|
- Hyperparameters
|
|||
|
- Fine-tuning advances
|
|||
|
- Resources","[-0.037458457, 0.034379363, 0.040421795, -0.030142713, -0.013809622, -0.032110557, 0.009787121, 0.042528544, -0.019226976, 0.08940949, 0.0372964, -0.0015858493, -0.057738807, 0.0047749113, 0.022456553, 0.0012248371, -0.029309275, 0.026994165, -0.008565902, 0.011546603, 0.029077763, -0.05019155, 0.017490644, 0.028429532, 0.0043958123, 0.0013999172, -0.009104164, 0.04630217, 0.02646169, -0.015858494, -0.0025089988, -0.019539516, -0.042158127, -0.05672016, 0.018891286, -0.0011148695, 0.07926931, -0.008062365, 0.013983255, 0.00541446, -0.033175506, -0.049867436, -0.057738807, 0.0639433, 0.022444976, -0.016784538, 0.0010439693, -0.016414119, -0.010487442, 0.04012083, -0.044056516, 0.03329126, -0.036324054, -0.01570801, 0.0038401862, 0.007836643, -0.014585184, -0.010348535, -0.007871369, -0.0055244276, -0.019562667, -0.04968223, 0.033036597, 0.034680326, -0.021877775, -0.02334787, -0.041116327, -0.0037736269, 0.0037215368, 0.017247558, 0.049450718, -0.022803819, -0.00024380986, 0.054543957, 0.021715717, -0.014596759, 0.005133753, 0.078435875, -0.039634656, -0.009891301, -0.011419273, -0.024841115, -0.019967811, -0.010962039, -0.030165864, -0.008606416, -0.046186414, -0.042922113, -0.022838546, -0.045167767, -0.019516366, 0.010365899, -0.01612473, 0.060933657, 0.032342065, 0.040792212, -0.021680992, 0.031323418, 0.005371052, 0.05634974, 0.0060308576, 0.006731178, -0.042111825, -0.016240487, 0.02861474, 0.0028128568, -0.03544431, 0.035698973, -0.013821198, -0.024239186, -0.06625841, -0.027017316, -0.044565838, 0.0074083474, 0.0015265247, -0.048987698, -0.0026927607, -0.009364614, -0.006708027, -0.04778384, -0.006980052, 0.0048212134, 0.0075241025, -0.026160726, -0.007877157, -0.04185716, 0.010990977, 0.028522138, -0.005177161, -0.024030827, 0.041370988, 0.024586452, -0.00065401813, -0.020662343, -0.00714211, -0.006331822, -0.043454587, 0.03259673, -0.022329222, -0.017305436, 0.025095776, -0.028846253, 0.024493849, 0.038106687, -0.054312445, -0.014122162, -0.034471966, 0.033846885, -0.014110587, 0.036532413, -0.046186414, 0.026924713, -0.052182548, -0.0072231386, 0.021669416, 0.0416025, -0.013936954, 0.020511862, -0.0029141428, -0.040398642, 0.035235953, 0.017143378, -0.01472409, -0.027688697, 0.029957505, -0.022155588, -0.016252061, 0.020940157, -0.0597761, -0.0062102787, 0.0034032096, -0.009613488, 0.008525387, 0.040861666, 0.027017316, -0.008091304, -0.028406382, -0.015846917, -0.012490011, 0.014515731, -0.053664215, 0.0077787647, -0.06977737, 0.035675824, 0.0012190493, -0.050469365, 0.0058398615, -0.036393505, -0.00022210572, -0.035930485, 0.003165911, -0.058294434, 0.05083978, 0.014527306, -0.025975518, 0.035583217, 0.02334787, -0.022907998, -0.024956869, -0.010441139, 0.01633309, -0.008369117, 0.0021646265, 0.011621845, -0.00015174813, 0.010499017, -0.0107073765, 0.031253964, -0.010198053, -0.052460358, -0.0016827945, 0.029031461, 0.038245592, 0.020650769, -0.02965654, 0.013045637, -0.037226945, 0.00020003984, 0.0024916355, 0.0012176024, -0.0051019206, -0.011621845, 0.05482177, -0.0014831164, -0.020708645, -0.02838323, 0.0007234714, -0.028128568, 0.021333724, -0.045306675, 0.030466828, -0.05866485, -0.017212832, -0.00950352, -0.0065170303, -0.029401878, 0.016194183, -0.059405684, 0.03215686, -0.023984523, -0.0062913075, 0.0021704142, -0.06445262, -0.01301091, 0.004957226, 0.06625841, -0.0054260357, -0.06750856, 0.045306675, -0.016506724, 0.04778384, -0.008884229, -0.0073967716, -0.04651053, 0.043778703, -0.065008245, 0.031902194, -0.0010909949, 0.0058630123, -0.016900292, -0.051534314, -0.030999303, -0.018891286, -0.0065401816, -0.036393505, 0.004381343, 0.0104122, 0.020812826, -0.005240827, -0.030976152, 0.019446911, 0.02921667, 0.0012653515, 0.0010331172, -0.00015012032, 0.026924713, 0.0152102625, 0.03690283, -0.019701574, -0.046209566, -0.02643854, -0.015823767, 0.05227515, -0.00450578, -0.0351665, -0.0120732905, -0.011205126, -0.026068121, 0.0014874572, 0.0026667155, 0.023822466, -0.053432703, 0.045352977, 0.0033771645, 0.003110927, -0.004734397, 0.030397374, -0.00849066, 0.03542116, -0.009723456, 0.03157
|
|||
|
"When to Fine-Tune
|
|||
|
**Good for:**
|
|||
|
- **Following a given format or tone for the output:** Fine-tuning is effective when you need the model to adhere to a specific style or structure in its responses.
|
|||
|
- **Processing the input following specific, complex instructions:** It helps in handling detailed and intricate instructions accurately.
|
|||
|
- **Improving latency:** Fine-tuning can enhance the speed of the model's responses.
|
|||
|
- **Reducing token usage:** It can optimize the model to use fewer tokens, making it more efficient.
|
|||
|
**Not good for:**
|
|||
|
- **Teaching the model new knowledge:** Fine-tuning is not suitable for adding new information to the model. Instead, use Retrieval-Augmented Generation (RAG) or custom models.
|
|||
|
- **Performing well at multiple, unrelated tasks:** For diverse tasks, it's better to use prompt engineering or create multiple fine-tuned models.
|
|||
|
- **Including up-to-date content in responses:** Fine-tuning is not ideal for ensuring the model has the latest information. RAG is recommended for this purpose.","[-0.02171865, 0.0329743, 0.031204047, -0.03635628, -0.004138301, -0.026619878, 0.017240169, 0.054428734, -0.0180064, 0.08613479, 0.029698009, -0.021177005, -0.043648675, 0.02154691, 0.018825471, -0.02927526, -0.04079513, -0.036911137, -0.01694953, 0.011255651, 0.012999484, -0.020225823, -0.0047030654, 0.037650943, 0.031547528, -0.0034546393, 0.015166065, 0.038100112, 0.040002476, 0.004468573, -0.009095675, -0.017187325, -0.04079513, -0.050121993, -0.013442048, -0.0043860045, 0.057387967, -0.011955827, 0.0068300134, -0.013191042, -0.02278873, -0.015152854, -0.044705544, 0.04977851, 0.03606564, 0.010165755, 0.02095242, 0.0010931984, -0.034718134, 0.048933018, -0.04761193, 0.031864587, -0.017438332, -0.023251109, 0.001636495, 0.020833522, -0.027795644, -0.040240273, 0.046607904, 0.0049837963, 0.0014878728, -0.037703786, 0.041191455, 0.0317589, -0.019116111, -0.008322841, -0.06726969, -0.007622665, -0.015390649, 0.022207452, 0.029856538, -0.050254103, 0.030754877, -0.0055914954, -0.0038773867, 0.0003727939, 0.043384455, 0.06388771, -0.007867066, -0.029143153, 0.008871091, -0.03374053, -0.015100011, -0.01680421, -0.032921456, 0.0013755806, -0.033291362, -0.025774384, -0.046422955, -0.05744081, -0.035008773, 0.039553307, -0.027901331, 0.045339663, -0.010172361, 0.016592838, -0.011116937, 0.040372383, 0.00088595314, 0.018680153, 0.0016736506, -0.007655692, -0.015509547, -0.002538136, 0.034268964, -0.036620498, -0.027901331, 0.035537206, -0.024440087, 0.00037361958, -0.04856311, -0.03667334, -0.0695948, -0.0076953247, -0.0062421304, -0.053054806, -0.039526887, 0.00058581895, 0.002427495, -0.020688202, 0.014148829, 0.00020084632, 0.012656001, -0.0049210447, -0.0032019815, -0.032128807, 0.05617257, 0.008223759, 0.0061925896, -0.006882857, 0.05065043, 0.00862669, 0.018429147, -0.00674084, -0.040081743, -0.040398803, -0.053979564, 0.01770255, -0.050914645, 0.016579626, 0.025470534, -0.03450676, -0.0057863556, 0.017662916, -0.024070183, 0.0071999175, -0.047400557, 0.027954174, -0.0023977708, 0.03987037, -0.070598826, 0.0076160594, -0.04961998, -0.0012170502, 0.044705544, 0.01208133, -0.028561873, 0.004729487, -0.016724946, -0.056912374, 0.011288678, 0.05284343, 0.0049078334, -0.030411394, 0.03696398, -0.029169574, -0.017781815, 0.02219424, -0.04681928, 0.0016810816, 0.01923501, -0.017359067, -0.0070281764, -0.021586541, 0.018984003, -0.010271442, -0.06441614, -0.017226959, -0.0031788626, 0.0034183094, -0.03450676, 0.008263391, -0.06579007, 0.06499742, -0.013646816, -0.055379916, -0.03680545, -0.003841057, 0.004940861, -0.009511817, -0.013792136, -0.06748106, 0.06621282, 0.030252865, -0.006014243, 0.020899577, 0.03976468, -0.018204562, -0.024981732, -0.027002994, 0.0064667147, 0.0035702342, -0.005399938, -0.020120136, 0.003162349, 0.0051291157, -0.039183404, 0.031811744, -0.019287853, -0.04510187, -0.002394468, 0.024704304, -0.0006378367, 0.03667334, -0.03585427, -0.011949221, -0.038760655, -0.013726081, -0.0019073175, -0.007054598, -0.015985139, -0.027822066, 0.04787615, 0.014584787, 0.0056476416, 0.0053966353, 0.016936319, -0.02924884, 0.032128807, -0.0643633, 0.01062153, -0.034612447, -0.024928888, -0.017913923, 0.015786976, 0.005849107, -0.0029278563, -0.03712251, 0.022986893, -0.009432552, -0.027042625, -0.020912787, -0.05252637, -0.035669316, -0.04589452, 0.04132356, -0.041640624, -0.054640107, 0.049540717, 0.00562122, 0.057176594, -0.027293632, -0.0014036536, -0.056965217, 0.0208071, -0.02787491, 0.022207452, 0.045815255, -0.030279286, -0.016711734, -0.026091443, 0.016724946, 0.010595107, 0.012279492, -0.03278935, -0.0071668904, -0.0089437505, 0.0026983176, 0.010581897, -0.011718031, 0.020767469, -0.010350707, -0.0036494995, 0.010773455, -0.0012476004, 0.023052946, -0.002510063, 0.003586748, -0.050016306, -0.042327587, -0.05559129, -0.024387244, 0.06267231, 0.006463412, -0.0412443, -0.017742181, 0.007807617, -0.017966766, 0.011896377, 0.0003529776, 0.027346475, -0.0
|
|||
|
"**Preparing the Dataset**
|
|||
|
guidance on preparing a dataset for training a chatbot model. It includes an example format using JSONL (JSON Lines) to structure the data. The example shows a conversation with three roles:
|
|||
|
. **System**: Sets the context by describing the chatbot as ""Marv is a factual chatbot that is also sarcastic.""
|
|||
|
. **User**: Asks a question, ""What's the capital of France?""
|
|||
|
. **Assistant**: Responds with a sarcastic answer, ""Paris, as if everyone doesn't know that already.""
|
|||
|
Key recommendations for dataset preparation include:
|
|||
|
- Use a set of instructions and prompts that have proven effective for the model before fine-tuning. These should be included in every training example.
|
|||
|
- If you choose to shorten instructions or prompts, be aware that more training examples may be needed to achieve good results.
|
|||
|
- It is recommended to use 50-100 examples, even though the minimum required is 10.","[-0.0026495226, -0.01243102, 0.025543513, -0.043073837, 0.0021486983, -0.0124427695, -0.0076607037, 0.0075667077, 0.009763872, 0.06025167, 0.026083993, -0.052966952, -0.019609991, -0.03755155, -0.0232876, 0.025802003, -0.020079974, 0.05639782, -0.05531686, 0.00802494, 0.0048496253, 0.027164951, 0.009194019, 0.0025819626, 0.031747274, 0.043097336, -0.015756141, 0.014252199, -0.02380458, -0.03127729, 0.003184127, -0.015450653, -0.07012129, 0.014769179, 0.018822772, 0.014111205, 0.02899788, 0.0033427458, 0.022970362, 0.016132127, -0.021442922, -0.06152062, 0.0069733555, 0.023945574, -0.031371288, -0.025966497, -0.026130991, -0.016014632, -0.009787371, 0.040042453, -0.07035628, 0.041287903, -0.013030247, 0.0027376441, 0.0068323608, -0.034708157, -0.026553974, 0.009229268, -0.007813448, 0.0048760613, 0.0027405815, -0.06283657, -0.008442049, 0.022864616, -0.018540783, -0.057243787, -0.04326183, -0.02020922, -0.050523046, 0.05334294, 0.026177987, -0.005569285, -0.0061508873, 0.0006040001, 0.012818755, -0.006192011, 0.028856885, 0.04807914, -0.026694968, -0.057854764, -0.0015670956, -0.026177987, -0.026976958, -0.01992723, -0.02020922, -0.0026553974, -0.035812616, -0.00011795443, -0.0310658, -0.06589145, -0.047021683, -0.03214676, -0.05719679, 0.023322849, 0.079285935, -0.008618292, 0.01653161, -0.021924652, 0.018764025, -0.014310947, 0.014393194, -0.0132299885, -0.049301095, 0.008030815, -0.004300334, -0.01345323, 0.016907597, -0.009599379, -0.034308676, -0.031488784, -0.07886295, 0.010392473, -0.007272969, -0.03961947, 0.014510689, -0.008165934, 0.0061450126, -0.026248485, 0.028034417, -0.066596426, 0.031676777, -0.011749546, -0.0078016985, -0.034567162, 0.014651684, -0.0388675, -0.01528616, -0.039196484, 0.038186025, -0.0069733555, -0.009264517, -0.030219832, 0.047562163, -0.0019709864, -0.029350366, -0.034708157, -0.029773349, -0.01889327, -0.007560833, -0.006309506, -0.017988555, -0.036400095, -0.019551244, 0.06495149, -0.023311099, -0.035084143, -0.051932994, 0.036823075, -0.053718925, 0.017636068, -0.020538207, 0.030619316, 0.023992572, 0.025167527, 0.003184127, 0.006004018, -0.0076019564, 0.023487343, 0.0025437768, -0.094372354, 0.015826639, -0.0008819503, 0.005745528, -0.016237872, -0.034755155, -0.021301927, -0.020620452, 0.009270391, -0.037410554, -0.028128413, 0.031770773, -0.010398348, 0.041475896, -0.011455807, 0.007349341, -0.021807157, -0.02768193, -0.012619012, 0.028339906, -0.005519349, -0.027164951, -0.013265237, -0.011320688, -0.011884666, -0.016719604, -0.037034567, 0.013770468, -0.036165103, -0.02097294, -0.04481277, 0.01267776, -0.07218921, 0.047891147, 0.009094149, 0.024650548, -0.0047027557, 0.050100066, -0.0127952555, 0.003777479, 0.011855292, -0.0066091195, 0.052167986, -0.021842405, -0.042227868, -0.00049164507, -0.02253563, -0.032945726, -0.006027517, -0.041076414, -0.021090435, 0.02561401, -0.014169953, 0.035389632, 0.023416845, -0.036470592, 0.027752427, -0.09197544, 0.0036041732, -0.016919347, -0.012501517, -0.01756557, 0.036188602, 0.045118257, -0.021466421, -0.028104914, 0.023346348, 0.054893877, -0.04859612, 0.0066032447, -0.03694057, 0.020573456, -0.040042453, -0.011690798, -0.06546847, 0.0039537223, -0.02458005, 0.012842254, 0.008759286, -0.00261868, 0.040982418, -0.019069513, 0.03315722, 0.017694816, 0.015368406, 0.030525321, 0.018775774, -0.01319474, -0.05592784, 0.038491514, -6.7559886e-05, 0.05273196, -0.024885539, 0.031371288, -0.07914494, -0.0019122387, -0.0044207666, -0.03029033, -0.014263948, -0.018446786, -0.023369847, -0.023146605, 0.058606736, -0.0194455, 0.036470592, -0.01627312, 0.0050141187, -0.02354609, -0.008048439, -0.027846424, -0.047773656, -0.013864464, 0.014592936, 0.054470897, 0.005777839, -0.058982722, 0.043097336, -0.0439198, 0.011867042, 0.017788813, -0.0034719908, -0.055269863, 0.0137469685, 0.010427722, 0.051698003, 0.019621741, 0.036141604, 0.014839676, -0.014087706, -0.016355367, 0.016179124, 0.023428595, -0.00010785716, -0.022065647, 0.0023322848, -0.0041975253, -0.03127729, 0.
|
|||
|
"**Best Practices**
|
|||
|
. **Curate Examples Carefully**
|
|||
|
- Building datasets can be challenging, so start small and focus on high-quality examples.
|
|||
|
- Use ""prompt baking"" to generate initial examples.
|
|||
|
- Ensure multi-turn conversations are well-represented.
|
|||
|
- Collect examples to address issues found during evaluation.
|
|||
|
- Balance and diversify your data.
|
|||
|
- Ensure examples contain all necessary information for responses.
|
|||
|
. **Iterate on Hyperparameters**
|
|||
|
- Begin with default settings and adjust based on performance.
|
|||
|
- Increase the learning rate multiplier if the model doesn't converge.
|
|||
|
- Increase the number of epochs if the model doesn't follow training data closely.
|
|||
|
- Decrease the number of epochs by 1-2 if the model becomes less diverse.
|
|||
|
. **Establish a Baseline**
|
|||
|
- Start with zero-shot or few-shot prompts to create a baseline before fine-tuning.
|
|||
|
. **Automate Your Feedback Pipeline**
|
|||
|
- Use automated evaluations to identify and clean up problem cases for training data.
|
|||
|
- Consider using the G-Eval approach with GPT-4 for automated testing with a scorecard.
|
|||
|
. **Optimize for Latency and Token Efficiency**
|
|||
|
- After establishing a baseline, consider fine-tuning with GPT-3.5 for similar performance at lower cost and latency.
|
|||
|
- Experiment with reducing or removing system instructions in subsequent fine-tuned versions.","[-0.01760838, 0.010136614, 0.08206194, -0.018819675, 0.029377053, -0.017939894, -0.0019316942, 0.08736613, 0.024225868, 0.08762114, 0.024684884, -0.017952643, -0.016601095, -0.03179964, -0.01173042, -0.024582881, 0.0032577417, -0.01201093, 0.004634791, 0.021038253, -0.0012256376, -0.010053735, 0.0033693083, 0.030244084, 0.006585611, 0.003841075, 0.002974044, 0.026571952, -0.0006060451, -0.036976326, 0.02565392, -0.016958108, -0.0530419, -0.035293266, 0.026291441, 0.035420768, -0.007752278, 0.0065473597, 0.004223589, 0.008702187, -0.00013925889, -0.017391624, -0.034196727, 0.055693995, 0.009441713, -0.0061329696, 0.022300549, -0.011520037, -0.014752278, 0.035828784, -0.05268489, 0.06640438, -0.013298727, -0.0124125695, -0.0064102923, -0.018947178, -0.04103097, -0.043963574, -0.019061932, -0.0019779147, -0.027260477, -0.027107472, 0.030601097, 0.019724956, -0.013923499, -0.019775959, -0.01760838, 0.021178508, -0.00586521, 0.043147545, 0.027591988, 0.008893443, -0.027030969, -0.010168489, 0.0060628424, -0.012183062, 0.023486342, 0.04883425, 0.014739528, -0.055898003, 0.0047814213, -0.050925326, 0.0036753193, -0.021102006, -0.03044809, 0.005562387, -0.04549363, -0.02817851, -0.040291443, -0.035905287, -0.028051006, -0.015453554, -0.030932609, 0.022950822, 0.035012756, -0.0010630693, 0.016639346, 0.0007897314, 0.033074684, 0.040061936, 0.023919856, 0.009696722, -0.041234978, 0.0306776, 0.03547177, -0.036415305, -0.0021054193, 0.013375229, -0.035599276, -0.018449912, -0.083796, -0.0037709477, -0.04694718, -0.03718033, -0.01131603, -0.020005466, -0.036364302, 0.0024050549, 0.0075227697, -0.050083794, -0.020158472, 0.020630239, 0.014841531, -0.025857927, 0.015721314, -0.061508205, 0.046182156, -0.024442626, 0.01561931, -0.033584703, 0.023766851, 0.006980875, 0.052378878, -0.04299454, 0.015848817, -0.0076056477, -0.016562844, 0.0057313303, -0.042867035, -0.005884336, -0.00021416783, -0.025067398, -0.031391624, 0.04633516, -0.054061938, -0.026699457, -0.0307031, 0.038659386, -0.054010935, 0.07073954, -0.011628416, 0.03881239, -0.03712933, 0.029989075, -0.00037693538, -0.013617488, -0.03572678, 0.07619673, -0.0024496815, -0.11567214, 0.020145722, 0.027795997, -0.013024592, 0.004561476, -0.005469946, 0.020336978, -0.026087435, -0.0009722223, -0.05436795, -0.053806927, 0.03182514, -0.032233156, -0.014650275, 0.01340073, 0.0055336985, 0.0041343356, -0.07155556, 0.016078327, -0.011341532, -0.009849728, -0.03600729, -0.017442625, -0.037817854, 0.011959928, -0.04271403, -0.034783248, -0.038098365, -0.0073123868, -0.031927142, -0.016562844, -0.0006506718, -0.022491805, 0.04375957, -0.0028449458, 0.019074684, -0.012922588, 0.07002551, -0.010933517, 0.0056484523, 0.025972681, -0.0010535065, 0.019584702, -0.006681239, -0.055745, 0.085530065, -0.045697637, -0.01004736, -0.013859747, -0.061253194, -0.021229511, 0.015887069, 0.018322406, 0.031774137, 0.035905287, -0.059366126, 0.02538616, -0.04557013, 0.015874319, 0.0026313756, 0.036389805, 0.0048961756, 0.0043765944, 0.03485975, -0.010978144, 0.011953553, 0.0153388, 0.03850638, -0.016690347, 0.021267762, -0.031927142, 0.0038187618, -0.02483789, -0.010455375, -0.01759563, 0.014637524, -0.021918036, 0.024111114, -0.016601095, -0.0005132059, -0.047559205, 0.025883427, 0.009231331, -0.024455376, -0.022249548, 0.01706011, 0.030040076, -0.038633883, -0.09251732, 0.03763935, 0.026189439, 0.018768672, -0.062885255, -0.015185794, -0.0044594724, 0.020171223, -0.042816035, 0.020770494, -0.013336978, -0.037817854, -0.03098361, -0.044244085, 0.05635702, -0.008428052, 0.01700911, 0.02649545, -0.005122496, -0.054112937, -0.012457197, 0.0025229966, -0.06273225, 0.010627505, 0.024939893, 0.027974503, 0.009830602, -0.014140257, -0.014012752, 0.008440803, -0.007031877, -0.03185064, -0.020336978, -0.07150456, -0.01646084, 0.044014577, 0.02342259, 0.007510019, 0.0075418954, 0.013209473, 0.0054922593, -0.01787614, -0.029428054, 0.013056468, -0.045391627, 0.015007287, -0.023983609, 0.028076505, 0.0021930786, 0.0382768
|