269 lines
8.8 KiB
Plaintext
269 lines
8.8 KiB
Plaintext
{
|
|
"edges":[
|
|
{"fromNode":"258f55793c08ec9b","fromSide":"bottom","id":"391218fa7e78f94b","toNode":"8bb1d2063a8eee5c","toSide":"top"},
|
|
{"fromNode":"7046fe626e6a00c6","fromSide":"bottom","id":"8a7f1613db523f59","toNode":"8d8d274b7e0659bc","toSide":"top"},
|
|
{"fromEnd":"arrow","fromNode":"8bb1d2063a8eee5c","fromSide":"right","id":"74a5db9fc5d23a44","label":"匹配","toNode":"8d8d274b7e0659bc","toSide":"left"},
|
|
{"fromNode":"6ff6e60699c83ba0","fromSide":"bottom","id":"22ee5d1522146d24","toNode":"51895cca1d63c642","toSide":"top"},
|
|
{"fromNode":"04debfe2a686fbd9","fromSide":"bottom","id":"dbd020ffad92f19f","toNode":"ce9b2bf9eaf6f352","toSide":"top"},
|
|
{"fromNode":"8d705284d54c4bf8","fromSide":"right","id":"29bbf34481b2cf84","toNode":"9a1235e1dcfd91d5","toSide":"left"},
|
|
{"fromNode":"48e5dbe21e9dd690","fromSide":"right","id":"ed564faa07d5a3e0","toNode":"4691e870fa3a13a9","toSide":"left"},
|
|
{"fromNode":"e22849b89185cd61","fromSide":"right","id":"9760a31471da1233","toNode":"fadf39c3d47836a8","toSide":"left"},
|
|
{"fromNode":"1472033b4b40e3c9","fromSide":"bottom","id":"e0ffdf72232e96ab","toNode":"78a782c53235378b","toSide":"top"}
|
|
],
|
|
"nodes":[
|
|
{
|
|
"height":860,
|
|
"id":"d92ec6c2200d9b77",
|
|
"label":"特征向量的存储-向量数据库",
|
|
"styleAttributes":{},
|
|
"type":"group",
|
|
"width":1120,
|
|
"x":-340,
|
|
"y":1600
|
|
},
|
|
{
|
|
"height":400,
|
|
"id":"60797eca86c1e565",
|
|
"label":"场景举例",
|
|
"styleAttributes":{},
|
|
"type":"group",
|
|
"width":1120,
|
|
"x":-340,
|
|
"y":520
|
|
},
|
|
{
|
|
"height":300,
|
|
"id":"324a73f0cc613d91",
|
|
"label":"个性化推荐",
|
|
"styleAttributes":{},
|
|
"type":"group",
|
|
"width":1120,
|
|
"x":-340,
|
|
"y":140
|
|
},
|
|
{
|
|
"height":160,
|
|
"id":"1472033b4b40e3c9",
|
|
"label":"特征向量的提取-Embedding模型",
|
|
"styleAttributes":{},
|
|
"type":"group",
|
|
"width":1120,
|
|
"x":-340,
|
|
"y":980
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"258f55793c08ec9b",
|
|
"styleAttributes":{},
|
|
"text":"用户偏好",
|
|
"type":"text",
|
|
"width":140,
|
|
"x":-220,
|
|
"y":200
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"7046fe626e6a00c6",
|
|
"styleAttributes":{},
|
|
"text":"目标内容",
|
|
"type":"text",
|
|
"width":140,
|
|
"x":500,
|
|
"y":200
|
|
},
|
|
{
|
|
"height":621,
|
|
"id":"e22849b89185cd61",
|
|
"styleAttributes":{},
|
|
"text":"##### 多维向量\n* 维度:可以认为是大模型计算出来的基于语义上不同维度的值。\n* 例:广州这夏天,真是让我这东北人没法活。\n\t* 维度一:情感[-1, 1]:强烈得分 0.9 \n\t* 维度二:温度[-1, 1]:热得分 0.88\n\t* 维度三:色温[-1, 1]:暖色 得分 0.91\n\t* 维度四:科技[-1, 1]:不相关得分 0.001\n\t* 维度五:喜好[-1, 1]:厌恶得分 -0.82\n\n##### 向量的距离\n* 在二维空间里,向量的距离是平面上一个线段的距离\n\t* 这个距离越近,两个点的x,y的坐标就越近\n* 在三维空间里,向量的距离是立体空间上两个点的连线\n\t* 这个距离越近,两个点的x,y,z的坐标就越近\n* 在四维、五维,只要是空间,对应维度的向量,都有一个距离。距离越近,相近度越大",
|
|
"type":"text",
|
|
"width":640,
|
|
"x":-340,
|
|
"y":-540
|
|
},
|
|
{
|
|
"height":347,
|
|
"id":"fadf39c3d47836a8",
|
|
"styleAttributes":{},
|
|
"text":"##### 感受\n前例:\n* 广州这夏天,真是让我这东北人没法活。\n\n对比例子:\n1. 机房服务器的风扇是真的吵。\n2. 机房没了空调,热得没法呆人了。\n\n相对来说,2描述的场景和前例更加相似。",
|
|
"type":"text",
|
|
"width":400,
|
|
"x":370,
|
|
"y":-403
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"8bb1d2063a8eee5c",
|
|
"styleAttributes":{},
|
|
"text":"多维特征向量",
|
|
"type":"text",
|
|
"width":180,
|
|
"x":-240,
|
|
"y":320
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"8d8d274b7e0659bc",
|
|
"styleAttributes":{},
|
|
"text":"多维特征向量",
|
|
"type":"text",
|
|
"width":180,
|
|
"x":480,
|
|
"y":320
|
|
},
|
|
{
|
|
"height":192,
|
|
"id":"6ff6e60699c83ba0",
|
|
"styleAttributes":{},
|
|
"text":"#### 公益租赁平台 - AI中介\n个性化推荐房源:\n1. 用户当前的位置,推荐周边\n2. 用户搜索记录,小区,户型,价位,配套情况,交通偏好",
|
|
"type":"text",
|
|
"width":503,
|
|
"x":-310,
|
|
"y":540
|
|
},
|
|
{
|
|
"height":192,
|
|
"id":"04debfe2a686fbd9",
|
|
"styleAttributes":{},
|
|
"text":"#### 公益租赁平台 - 健康咨询\n个性化膳食推荐:\n1. 用户体质评测,匹配食材\n2. 用户搜索记录,食材偏好,料理方式偏好",
|
|
"type":"text",
|
|
"width":503,
|
|
"x":249,
|
|
"y":540
|
|
},
|
|
{
|
|
"height":100,
|
|
"id":"51895cca1d63c642",
|
|
"styleAttributes":{},
|
|
"text":"房屋属性:位置,周边,设施,价格,户型 ....",
|
|
"type":"text",
|
|
"width":503,
|
|
"x":-310,
|
|
"y":800
|
|
},
|
|
{
|
|
"height":126,
|
|
"id":"8d705284d54c4bf8",
|
|
"styleAttributes":{},
|
|
"text":"* BAAI/bge-m3\n* BAAI/bge-large-zh-v1.5\n* BAAI/bge-large-en-v1.5",
|
|
"type":"text",
|
|
"width":268,
|
|
"x":-312,
|
|
"y":1000
|
|
},
|
|
{
|
|
"height":329,
|
|
"id":"78a782c53235378b",
|
|
"styleAttributes":{},
|
|
"text":"\n| **度量方法** | **核心特性** | | **典型应用场景** | **案例参考** |\n| --------- | ------------------- | --- | ----------------------------------------------------- | --------- |\n| **L1距离** | 计算各维度绝对差之和,路径类似网格行走 | | 1. 特征选择(稀疏性)<br>2. 路径规划(网格状移动)<br>3. 鲁棒性要求高的数据分析 | 城市导航、异常检测 |\n| **L2距离** | 计算多维空间中的直线距离 | | 1. 图像特征匹配<br>2. 地理位置计算<br>3. 需要精确几何距离的场景 | 人脸识别、三维建模 |\n| **余弦相似度** | 计算向量夹角的余弦值,忽略向量长度 | | 1. 文本语义相似度<br>2. 用户兴趣推荐(忽略强度差异)<br>3. 高维稀疏数据(如NLP词向量) | 文档检索、广告推荐 |\n",
|
|
"type":"text",
|
|
"width":1120,
|
|
"x":-340,
|
|
"y":1200
|
|
},
|
|
{
|
|
"height":138,
|
|
"id":"bed4573cdc8d4dc7",
|
|
"styleAttributes":{},
|
|
"text":"传统数据库扩展\n* Sqlite-vec\n* postgres-vector",
|
|
"type":"text",
|
|
"width":210,
|
|
"x":-312,
|
|
"y":1630
|
|
},
|
|
{
|
|
"height":138,
|
|
"id":"44e6262f9df1ae6f",
|
|
"styleAttributes":{},
|
|
"text":"传统数据库扩展\n* Redis\n* MongoDB",
|
|
"type":"text",
|
|
"width":210,
|
|
"x":-38,
|
|
"y":1630
|
|
},
|
|
{
|
|
"height":138,
|
|
"id":"13bab0d5df168e4a",
|
|
"styleAttributes":{},
|
|
"text":"服务\n* Pinecone\n* Milvus",
|
|
"type":"text",
|
|
"width":216,
|
|
"x":520,
|
|
"y":1630
|
|
},
|
|
{
|
|
"height":138,
|
|
"id":"3389fe8228ace3e4",
|
|
"styleAttributes":{},
|
|
"text":"本地文件\n* chromaDB\n* lanceDB",
|
|
"type":"text",
|
|
"width":220,
|
|
"x":236,
|
|
"y":1630
|
|
},
|
|
{
|
|
"height":623,
|
|
"id":"019068aae556c2e1",
|
|
"styleAttributes":{},
|
|
"text":"```sql\ncreate virtual table vec_examples using vec0(\n sample_embedding float[5]\n);\ninsert into vec_examples(rowid, sample_embedding)\n values\n (1, '[-0.200, 0.250, 0.341, -0.211, 0.645'),\n (2, '[0.443, -0.501, 0.355, -0.771, 0.707'),\n (3, '[0.716, -0.927, 0.134, 0.052, -0.669'),\n (4, '[-0.710, 0.330, 0.656, 0.041, -0.990');\n-- KNN style query\nselect rowid,distance from vec_examples\nwhere sample_embedding match '[0.890, 0.544, 0.825, 0.961, 0.358]'\norder by distance\nlimit 2;\n\n/*\n┌───────┬──────────────────┐\n│ rowid │ distance │\n├───────┼──────────────────┤\n│ 2 │ 2.38687372207642 │\n│ 1 │ 2.38978505134583 │\n└───────┴──────────────────┘\n*/\n```\n",
|
|
"type":"text",
|
|
"width":1072,
|
|
"x":-312,
|
|
"y":1800
|
|
},
|
|
{
|
|
"height":100,
|
|
"id":"ce9b2bf9eaf6f352",
|
|
"styleAttributes":{},
|
|
"text":"* 膳食:适应人群,适应体质,所用食材,料理方式\n* 方案:面向人群,调养目标 ...",
|
|
"type":"text",
|
|
"width":503,
|
|
"x":249,
|
|
"y":800
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"9a1235e1dcfd91d5",
|
|
"styleAttributes":{},
|
|
"text":"1024",
|
|
"type":"text",
|
|
"width":100,
|
|
"x":-20,
|
|
"y":1033
|
|
},
|
|
{
|
|
"height":126,
|
|
"id":"3d30185fe259b33e",
|
|
"styleAttributes":{},
|
|
"text":"* 文本-Embedding\n* 图-Embedding\n* 声音-Embedding\n",
|
|
"type":"text",
|
|
"width":222,
|
|
"x":540,
|
|
"y":1000
|
|
},
|
|
{
|
|
"height":126,
|
|
"id":"48e5dbe21e9dd690",
|
|
"styleAttributes":{},
|
|
"text":"* text-embedding-ada-002\n* text-embedding-3-small\n* text-embedding-3-large",
|
|
"type":"text",
|
|
"width":283,
|
|
"x":108,
|
|
"y":1000
|
|
},
|
|
{
|
|
"height":60,
|
|
"id":"4691e870fa3a13a9",
|
|
"styleAttributes":{},
|
|
"text":"1536",
|
|
"type":"text",
|
|
"width":97,
|
|
"x":423,
|
|
"y":1033
|
|
}
|
|
],
|
|
"metadata":{
|
|
"version":"1.0-1.0",
|
|
"frontmatter":{}
|
|
}
|
|
} |