💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Add images to documentation
davidmezzettif223a949b0cd
diff --git a/docs/embeddings/indexing.md b/docs/embeddings/indexing.mdindex 19a26ef8..f215992f 100644--- a/docs/embeddings/indexing.md+++ b/docs/embeddings/indexing.md@@ -1,5 +1,8 @@# Index guide+++This section gives an in-depth overview on how to index data with txtai. We'll cover vectorization, indexing, updating and deleting data.## Vectorizationdiff --git a/docs/embeddings/query.md b/docs/embeddings/query.mdindex 3d164c97..7300604e 100644--- a/docs/embeddings/query.md+++ b/docs/embeddings/query.md@@ -1,5 +1,8 @@# Query guide+++This section covers how to query data with txtai. The simplest way to search for data is building a natural language string with the desired content to find. txtai also supports querying with SQL. We'll cover both methods here.## Natural language queriesdiff --git a/docs/images/indexing-dark.png b/docs/images/indexing-dark.pngnew file mode 100644index 00000000..42c47a0cBinary files /dev/null and b/docs/images/indexing-dark.png differdiff --git a/docs/images/indexing.excalidraw b/docs/images/indexing.excalidrawnew file mode 100644index 00000000..d3f6933d--- /dev/null+++ b/docs/images/indexing.excalidraw@@ -0,0 +1,333 @@+{+ "type": "excalidraw",+ "version": 2,+ "source": "https://excalidraw.com",+ "elements": [+ {+ "type": "rectangle",+ "version": 953,+ "versionNonce": 1696043931,+ "isDeleted": false,+ "id": "UO6MS3wSDu7yg2421__LI",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 933,+ "y": 267,+ "strokeColor": "#ffeb3b",+ "backgroundColor": "#ffeb3b",+ "width": 214,+ "height": 49,+ "seed": 1629565989,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "type": "text",+ "id": "8sp7H8ijWBlh6aMgZ0XTP"+ },+ {+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "type": "arrow"+ },+ {+ "id": "SJ0F0Y81z9hir5qQWAJjk",+ "type": "arrow"+ }+ ],+ "updated": 1669034076965,+ "link": null,+ "locked": false+ },+ {+ "type": "rectangle",+ "version": 1612,+ "versionNonce": 1217480597,+ "isDeleted": false,+ "id": "qYd3q0Vjks7VOHUC9RR51",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 549,+ "y": 267.5,+ "strokeColor": "#03a9f4",+ "backgroundColor": "#03a9f4",+ "width": 219,+ "height": 52,+ "seed": 1441952427,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "type": "text",+ "id": "WPeWn6N4rCHf0jY16N9Ge"+ },+ {+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "type": "arrow"+ }+ ],+ "updated": 1669034076965,+ "link": null,+ "locked": false+ },+ {+ "type": "text",+ "version": 1298,+ "versionNonce": 968386619,+ "isDeleted": false,+ "id": "WPeWn6N4rCHf0jY16N9Ge",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 554,+ "y": 275.5,+ "strokeColor": "#000",+ "backgroundColor": "#fa5252",+ "width": 209,+ "height": 36,+ "seed": 870516459,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669034076965,+ "link": null,+ "locked": false,+ "fontSize": 28,+ "fontFamily": 1,+ "text": "Vectorize",+ "baseline": 25,+ "textAlign": "center",+ "verticalAlign": "middle",+ "containerId": "qYd3q0Vjks7VOHUC9RR51",+ "originalText": "Vectorize"+ },+ {+ "type": "rectangle",+ "version": 1199,+ "versionNonce": 713919733,+ "isDeleted": false,+ "id": "5VuUdI_BsJ5pyE1nTqJUI",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 1332,+ "y": 268,+ "strokeColor": "#00e676",+ "backgroundColor": "#00e676",+ "width": 218,+ "height": 49,+ "seed": 1044404613,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "id": "bJJ9SGsJsvT071qBBH0w5",+ "type": "text"+ },+ {+ "id": "bJJ9SGsJsvT071qBBH0w5",+ "type": "text"+ },+ {+ "id": "Q51e0Hav-kYfjX3b8tt-r",+ "type": "arrow"+ },+ {+ "type": "text",+ "id": "bJJ9SGsJsvT071qBBH0w5"+ },+ {+ "id": "SJ0F0Y81z9hir5qQWAJjk",+ "type": "arrow"+ }+ ],+ "updated": 1669034076965,+ "link": null,+ "locked": false+ },+ {+ "type": "text",+ "version": 1382,+ "versionNonce": 949332187,+ "isDeleted": false,+ "id": "bJJ9SGsJsvT071qBBH0w5",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 1337,+ "y": 274.5,+ "strokeColor": "#000",+ "backgroundColor": "#fa5252",+ "width": 208,+ "height": 36,+ "seed": 128953675,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669034076965,+ "link": null,+ "locked": false,+ "fontSize": 28,+ "fontFamily": 1,+ "text": "Search",+ "baseline": 25,+ "textAlign": "center",+ "verticalAlign": "middle",+ "containerId": "5VuUdI_BsJ5pyE1nTqJUI",+ "originalText": "Search"+ },+ {+ "type": "text",+ "version": 943,+ "versionNonce": 60434005,+ "isDeleted": false,+ "id": "8sp7H8ijWBlh6aMgZ0XTP",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 938,+ "y": 273.5,+ "strokeColor": "#000",+ "backgroundColor": "transparent",+ "width": 204,+ "height": 36,+ "seed": 1854823263,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669034076965,+ "link": null,+ "locked": false,+ "fontSize": 28,+ "fontFamily": 1,+ "text": "Index",+ "baseline": 25,+ "textAlign": "center",+ "verticalAlign": "middle",+ "containerId": "UO6MS3wSDu7yg2421__LI",+ "originalText": "Index"+ },+ {+ "type": "arrow",+ "version": 1814,+ "versionNonce": 797594901,+ "isDeleted": false,+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 770.5,+ "y": 289.8470411964629,+ "strokeColor": "#000",+ "backgroundColor": "#f44336",+ "width": 158.1310513485223,+ "height": 0.5692601572380909,+ "seed": 660786897,+ "groupIds": [],+ "strokeSharpness": "round",+ "boundElements": [],+ "updated": 1669034076965,+ "link": null,+ "locked": false,+ "startBinding": {+ "elementId": "qYd3q0Vjks7VOHUC9RR51",+ "focus": -0.15367587596362536,+ "gap": 2.5+ },+ "endBinding": {+ "elementId": "UO6MS3wSDu7yg2421__LI",+ "focus": 0.027437144815141,+ "gap": 4.3689486514776945+ },+ "lastCommittedPoint": null,+ "startArrowhead": null,+ "endArrowhead": "arrow",+ "points": [+ [+ 0,+ 0+ ],+ [+ 158.1310513485223,+ 0.5692601572380909+ ]+ ]+ },+ {+ "type": "arrow",+ "version": 1963,+ "versionNonce": 616624827,+ "isDeleted": false,+ "id": "SJ0F0Y81z9hir5qQWAJjk",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 1149.5,+ "y": 292.6790761701911,+ "strokeColor": "#000",+ "backgroundColor": "#f44336",+ "width": 181.5,+ "height": 1.5898915058209013,+ "seed": 899541905,+ "groupIds": [],+ "strokeSharpness": "round",+ "boundElements": [],+ "updated": 1669034076965,+ "link": null,+ "locked": false,+ "startBinding": {+ "elementId": "UO6MS3wSDu7yg2421__LI",+ "focus": 0.08406032225724415,+ "gap": 2.5+ },+ "endBinding": {+ "elementId": "5VuUdI_BsJ5pyE1nTqJUI",+ "focus": 0.09327847520504394,+ "gap": 1+ },+ "lastCommittedPoint": null,+ "startArrowhead": null,+ "endArrowhead": "arrow",+ "points": [+ [+ 0,+ 0+ ],+ [+ 181.5,+ -1.5898915058209013+ ]+ ]+ }+ ],+ "appState": {+ "gridSize": null,+ "viewBackgroundColor": "#ffffff"+ },+ "files": {}+}\ No newline at end of filediff --git a/docs/images/indexing.png b/docs/images/indexing.pngnew file mode 100644index 00000000..55d7c4d2Binary files /dev/null and b/docs/images/indexing.png differdiff --git a/docs/images/query-dark.png b/docs/images/query-dark.pngnew file mode 100644index 00000000..0358eba7Binary files /dev/null and b/docs/images/query-dark.png differdiff --git a/docs/images/query.excalidraw b/docs/images/query.excalidrawnew file mode 100644index 00000000..d9f49305--- /dev/null+++ b/docs/images/query.excalidraw@@ -0,0 +1,243 @@+{+ "type": "excalidraw",+ "version": 2,+ "source": "https://excalidraw.com",+ "elements": [+ {+ "type": "rectangle",+ "version": 3038,+ "versionNonce": 1386987419,+ "isDeleted": false,+ "id": "pjs0X-Y0kuuXB-vpf_dvP",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 934.5,+ "y": -240.29250000000002,+ "strokeColor": "#ffeb3b",+ "backgroundColor": "#ffeb3b",+ "width": 312,+ "height": 146,+ "seed": 1534167490,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "id": "of5l7HpIH0kPvZ95rOMwM",+ "type": "text"+ },+ {+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "type": "arrow"+ },+ {+ "id": "of5l7HpIH0kPvZ95rOMwM",+ "type": "text"+ },+ {+ "type": "text",+ "id": "of5l7HpIH0kPvZ95rOMwM"+ }+ ],+ "updated": 1669033845173,+ "link": null,+ "locked": false+ },+ {+ "type": "text",+ "version": 2554,+ "versionNonce": 1319492501,+ "isDeleted": false,+ "id": "of5l7HpIH0kPvZ95rOMwM",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 939.5,+ "y": -235.29250000000002,+ "strokeColor": "#000",+ "backgroundColor": "#fa5252",+ "width": 260,+ "height": 130,+ "seed": 1972792158,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669033845173,+ "link": null,+ "locked": false,+ "fontSize": 20,+ "fontFamily": 1,+ "text": "SELECT\n count(*), flag\nFROM txtai\nGROUP BY flag\nORDER BY count(*) DESC",+ "baseline": 122,+ "textAlign": "left",+ "verticalAlign": "top",+ "containerId": "pjs0X-Y0kuuXB-vpf_dvP",+ "originalText": "SELECT\n count(*), flag\nFROM txtai\nGROUP BY flag\nORDER BY count(*) DESC"+ },+ {+ "type": "rectangle",+ "version": 3354,+ "versionNonce": 1004999739,+ "isDeleted": false,+ "id": "xMKXZw8aL27lv21eVGy_C",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 581,+ "y": -238.29250000000002,+ "strokeColor": "#03a9f4",+ "backgroundColor": "#03a9f4",+ "width": 302,+ "height": 140,+ "seed": 1704428866,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "id": "tlu8eCXVp5ApnEG74CF38",+ "type": "text"+ },+ {+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "type": "arrow"+ },+ {+ "type": "text",+ "id": "tlu8eCXVp5ApnEG74CF38"+ }+ ],+ "updated": 1669033845173,+ "link": null,+ "locked": false+ },+ {+ "type": "text",+ "version": 2750,+ "versionNonce": 686792949,+ "isDeleted": false,+ "id": "tlu8eCXVp5ApnEG74CF38",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 586,+ "y": -233.29250000000002,+ "strokeColor": "#000",+ "backgroundColor": "#fa5252",+ "width": 290,+ "height": 130,+ "seed": 92268510,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669033845173,+ "link": null,+ "locked": false,+ "fontSize": 20,+ "fontFamily": 1,+ "text": "SELECT\n text, flag, entry\nFROM txtai\nWHERE\n similar('text') AND flag = 1",+ "baseline": 122,+ "textAlign": "left",+ "verticalAlign": "top",+ "containerId": "xMKXZw8aL27lv21eVGy_C",+ "originalText": "SELECT\n text, flag, entry\nFROM txtai\nWHERE\n similar('text') AND flag = 1"+ },+ {+ "type": "rectangle",+ "version": 3169,+ "versionNonce": 1477367003,+ "isDeleted": false,+ "id": "Tsn_ukSxtC7CIwEMUMHxI",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 1301.5,+ "y": -236.79250000000002,+ "strokeColor": "#00e676",+ "backgroundColor": "#00e676",+ "width": 304,+ "height": 140,+ "seed": 919682718,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [+ {+ "id": "t3OC1akz9Oe2w6N8OCavg",+ "type": "text"+ },+ {+ "id": "Qzp41i_jzQIBlAB_qFKFH",+ "type": "arrow"+ },+ {+ "id": "t3OC1akz9Oe2w6N8OCavg",+ "type": "text"+ },+ {+ "id": "t3OC1akz9Oe2w6N8OCavg",+ "type": "text"+ },+ {+ "type": "text",+ "id": "t3OC1akz9Oe2w6N8OCavg"+ }+ ],+ "updated": 1669033845173,+ "link": null,+ "locked": false+ },+ {+ "type": "text",+ "version": 2769,+ "versionNonce": 345619029,+ "isDeleted": false,+ "id": "t3OC1akz9Oe2w6N8OCavg",+ "fillStyle": "hachure",+ "strokeWidth": 1,+ "strokeStyle": "solid",+ "roughness": 1,+ "opacity": 100,+ "angle": 0,+ "x": 1306.5,+ "y": -231.79250000000002,+ "strokeColor": "#000",+ "backgroundColor": "#fa5252",+ "width": 259,+ "height": 130,+ "seed": 1222509122,+ "groupIds": [],+ "strokeSharpness": "sharp",+ "boundElements": [],+ "updated": 1669033845173,+ "link": null,+ "locked": false,+ "fontSize": 20,+ "fontFamily": 1,+ "text": "SELECT\n translation(text, 'fr')\nFROM txtai\nWHERE\n similar('feel good story')",+ "baseline": 122,+ "textAlign": "left",+ "verticalAlign": "top",+ "containerId": "Tsn_ukSxtC7CIwEMUMHxI",+ "originalText": "SELECT\n translation(text, 'fr')\nFROM txtai\nWHERE\n similar('feel good story')"+ }+ ],+ "appState": {+ "gridSize": null,+ "viewBackgroundColor": "#ffffff"+ },+ "files": {}+}\ No newline at end of filediff --git a/docs/images/query.png b/docs/images/query.pngnew file mode 100644index 00000000..68ed7820Binary files /dev/null and b/docs/images/query.png differ