AI知识库

53AI知识库

学习大模型的前沿技术与行业应用场景


【商品分析系列】- 供应商分析
发布日期:2024-06-07 06:08:41 浏览次数: 1634


过了个五一,在想一整个应用的系列!目前想到是一个是做,关于商品商业环境的实践,本期用kimi从供应商视角进行观察!

看效果

话原理

从供应商的网站,我们可以拿到比如商品,成交量,价格的变动,供应商的评价,然后,评价则价值不大(因为数据很少,相关的买家也不愿意过多评价).

这里我们可以定期抓取供应商的某品类商品数据,从而对供货市场的变动进行感知!

本次的实践没有包含供应商的原材料的再洞察,后续逐一完善

来实践

1、适用抓取工具比如Instant Data Scraper工具抓取供应商(1688)商品数据

2、然后,CSV转为yaml文件

3、创建prompt文件

主要部分如下

-单品洞察

1.热销商品top2

商品标题、价格、成交量

2.复购商品Top2

商品标题、价格、成交量、复购率

3.新品Top2

日期、商品标题、价格、成交量

-特征洞察

参数1 参数1值

-供应商Top2观察

应商名,综合评价得分,其他分项得分

-趋势洞察

1.价格变动

1)涨价Top2

价格变动值、变动后价格、变动前价格、商品标题、价格、成交量、成交量

2)降价Top2

价格变动值、变动后价格、变动前价格、商品标题、价格、成交量、成交量

2.参数特征变动

参数1 参数1值

4、调用kimi大模型来输出我们想要的关注

from openai import OpenAI

import pandas as pd

client = OpenAI(

api_key="xxx",

base_url="https://api.moonshot.cn/v1",

)

def read_prompt(filename):

with open(filename, 'r') as file:

return file.read()

def generate_insights(prompt):

completion = client.chat.completions.create(

model="moonshot-v1-8k",

messages=[

{"role": "system", "content": "你是商品洞察分析师"},

{"role": "user", "content": prompt}

],

temperature=0.3,

)

# 将ChatCompletionMessage对象转换为字符串

return str(completion.choices[0].message)

if __name__ == "__main__":

# 读取prompt文件

filename_prompt = 'prompt.txt'  # 修改为你的prompt文件路径

prompt = read_prompt(filename_prompt)

# 使用Kimi生成洞察报告

insights_report = generate_insights(prompt)

# 将结果输出到文件

with open('insights_report.txt', 'w') as file:

file.write(insights_report)

print("洞察报告已生成并保存到 insights_report.txt 文件中。")

写在最后

经过这个demo的小实践会发现大模型在处理这种大批量的数据还是存在不适,其实如上的大多数统计都是数字类的,可以直接调用python进行统计效率更高;而对于文本类涉及到理解的,则调用大模型来工作效果会更好!

过了个五一,整个节奏都变化了!对我来讲,回家的路上老爸给我讲了不少触动我的,尤其是身边一些了不起人,Respect!我开始思考自己要成为什么样的人!我终于花了时间去思考了!

这几天已经尝试去按照target person去,,不过显示中还是很难!相信云卷云舒后,我们终将成为我们自己!

开始了英语对话惯常训练,感觉是对的,再多训练!

inferior 劣等

tactics 策略

embarassing使尴尬

lunch money card 午饭卡

debit card借计卡

card card信用卡

piggy bank存钱罐

shops and stalls 摊位

take cards 能使用信用卡

buy silly or expensive things愚蠢的

cash-free shops 无现金

block it from being used

carry annoying change in 不要携带烦人的零钱

annoying 烦人的

/*First time meet a people.

Good to see you again.

For instance.

G'Day for anyone

Entertain

clock in

clock out

breaking ice skill

dangerous area:

you wear a blue t-shirt and yellow shoes,

you look like a rainbow

and a woman wear grey and black, you said better than

raincloud

/*Casual topics

How was your journey?

Out of town, do you have a good evening?

Do you have good flight?

How are your children.

/*lunch time

how was your morning/day?

/*Interest

Do you see the game last night?

So, Culture

/* Refuse and walk away

I need more information.

we like to discuss this.

How about we look in this way.

I don't agree with it.

assertive 坚定的

Frankly speaking, your opinion.- Japanese

But, in my opinion.

45 years

Chinese asia

by white people

not embarassing them

embarasse

lose face

Basis equality

that is all.

compromise

bargain 讨价还价

prepare to walk away

present clear position

7

weak compromise will be 6

strong compromise will 5.5

5

no how about 5.5

how strong your nerve is?

paying threshold 支付门槛

I need to know more information.

RRP Recommended Retail Price

Normal department no bargain

leave way,10% profit

how much money they got.

accommodate 容纳

pay high rents

more relaxed than living in a city

bustling 繁忙的

cope with 应对

are meant to 原本就是

take up 占用

Public transport 公共交通

clearner

greener 绿色健康的

参考


53AI,企业落地应用大模型首选服务商

产品:大模型应用平台+智能体定制开发+落地咨询服务

承诺:先做场景POC验证,看到效果再签署服务协议。零风险落地应用大模型,已交付160+中大型企业

联系我们

售前咨询
186 6662 7370
预约演示
185 8882 0121

微信扫码

与创始人交个朋友

回到顶部

 
扫码咨询