paint-brush
人工智能 100 天,第 10 天:人工智能在设计思维中解决业务问题的效果如何?经过@sindamnataraj
711 讀數
711 讀數

人工智能 100 天,第 10 天:人工智能在设计思维中解决业务问题的效果如何?

经过 Nataraj5m2024/02/08
Read on Terminal Reader

太長; 讀書

在这篇文章中,我们将探讨如何使用人工智能来针对给定的业务问题进行设计思维。
featured image - 人工智能 100 天,第 10 天:人工智能在设计思维中解决业务问题的效果如何?
Nataraj HackerNoon profile picture
0-item


嘿大家! 我是 Nataraj和您一样,我也对人工智能的最新进展着迷。意识到我需要跟上所有正在发生的发展,我决定踏上个人学习之旅,于是人工智能100天诞生了!通过这个系列,我将学习法学硕士,并通过我的博客文章分享想法、实验、观点、趋势和学习。您可以在此处的HackerNoon 或此处的我的个人网站上跟踪整个旅程。在今天的文章中,我们将寻求在 GPT-4 的帮助下构建语义内核。

在这篇文章中,我们将探讨如何使用人工智能来针对给定的业务问题进行设计思维。为了这个例子,我们将设计思维定义为如下所示的一系列步骤。您还可以扩展这个想法以添加更多步骤并为它们编写逻辑。

设计思维



为了设置背景,我们以一家最近收到一些客户反馈的咖啡店为例,并用它来应用人工智能设计思维,并提出改善业务的方法。

我们将使用Open AI的gpt-4模型并使用微软的Semantic Kernel进行设计思维。在此过程中,我们还将探索如何在内核中使用插件的概念,这使得重用语义函数变得容易。


那么让我们开始吧。

第 1 步 – 设置内核

第一步是从本地 .env 文件加载 Open AI 的密钥,然后创建新的 Kernel 实例。然后将OpenAIChatCompletion服务添加到内核中。

设置语义内核


步骤 2 – 添加咖啡店业务的使用反馈和 SWOT 分析

 # SWOT questions strength_questions = ["What unique recipes or ingredients does the coffee shop use?","What are the skills and experience of the staff?","Does the coffee shop have a strong reputation in the local area?","Are there any unique features of the shop or its location that attract customers?", "Does the coffee shop have a strong reputation in the local area?", "Are there any unique features of the shop or its location that attract customers?"] weakness_questions = ["What are the operational challenges of the coffee shop? (eg, slow service, high staff turnover, not having wifi)","Are there financial constraints that limit growth or improvements?","Are there any gaps in the product offering?","Are there customer complaints or negative reviews that need to be addressed?"] opportunities_questions = ["Is there potential for new products or services (eg, delivery, food along with coffee)?","Are there under-served customer segments or market areas?","Can new technologies or systems enhance the business operations?","Are there partnerships or local events that can be leveraged for marketing?"] threats_questions = ["Who are the major competitors and what are they offering?","Are there potential negative impacts due to changes in the local area (eg, construction, closure of nearby businesses)?","Are there economic or industry trends that could impact the business negatively (eg, increased ingredient costs)?","Is there any risk due to changes in regulations or legislation (eg, health and safety, employment)?"] # SWOT answers strengths = [ "Unique coffee recipe that wins top awards","Owner trained in Sicily","Strong local reputation","Prime location on university campus" ] weaknesses = [ "High staff turnover","Floods in the area damaged the seating areas that are in need of repair","Absence of popular mocha latte from menu","Negative reviews from younger demographic for lack of hip ingredients" ] opportunities = [ "Untapped work from anywhere potential as they dont have wifi","Growing local tech startup community","Unexplored online presence and order capabilities","Upcoming annual food fair" ] threats = [ "Competition from big coffee chains nearby","There's nearby street construction that will impact foot traffic","Rising cost of coffee beans will increase the cost of coffee","No immediate local regulatory changes but it's election season" ] # Customer comments some positive some negative customer_comments = """ Customer 1: The seats look really raggedy. Customer 2: The americano is the best on this earth. Customer 3: I've noticed that there's a new server every time I visit, and they're clueless. Customer 4: Why aren't there any snacks? Customer 5: I love the coffe blend they use and can't get it anywhere else. Customer 6: The dark roast they have is exceptional. Customer 7: why is there no wifi? Customer 8: Why is the regular coffee so expensive? Customer 9: There's no way to do online ordering. Customer 10: Why is the seating so uncomfortable and dirty? """


第 3 步 – 创建设计思维插件

什么是插件?语义内核具有称为插件的功能,您可以在其中定义语义函数的输入并可以重复重用它们。插件由两个文件组成:.json(包含 LLM 的配置信息和输入参数)和 .txt(包含自定义提示)。对于设计思维用例,我们将创建 4 个插件。您可以 在此处找到所有 4 个插件的代码。

  • 同理心:获取客户反馈并隔离情绪,并对客户表达的每种情绪进行简洁的总结。
  • Define :从 empathize 步骤获取输出,在 Markdown 表中对分析进行分类。定义问题及其可能的根源。


  • Ideate :获取上述步骤的输出,并以降价表的形式生成想法,其中有两列,分别称为“低挂果”和“高挂果”。

Ideate 插件的结果


  • PrototypeWithPaper :该插件吸收上一步中生成的想法并提供低分辨率原型,以便可以测试解决方案。


第 4 步 – 将所有内容整合在一起:

请注意,在前面的步骤中,尽管我给出了四个插件的代码,但解释了它们在设计思维背景下的作用。我还显示了它们将生成的输出。但我们实际上并没有从我们的代码中调用这些插件。现在让我们这样做,如下所示。

 ## access design thiking plugin pluginsDirectory = "./plugins-sk" pluginDT = kernel.import_semantic_skill_from_directory(pluginsDirectory, "DesignThinking"); async def run_designthinking_async(): my_result = await kernel.run_async(pluginDT["Empathize"], pluginDT["Define"], pluginDT["Ideate"], pluginDT["PrototypeWithPaper"], input_str=customer_comments) display(my_result) asyncio.run(run_designthinking_async())


您已经看到了上一步中所有 4 个步骤生成的输出。请注意内核如何简单地在一次调用中调用一个插件,然后调用另一个插件。


总而言之,这就是我们所做的。我们编写了自定义提示并将它们制作为插件并将它们放在名为plugins-sk的文件夹中。然后使用内核通过咖啡店的 SWOT 分析和客户反馈来调用它们。现在,通过更改 SWOT 分析并获取客户对不同业务问题的反馈,您可以进行设计思维并提出 MVP 解决方案来解决您的问题。


尽管其核心是 4 个自定义提示,但该方法强调了 Kernel 如何通过插件轻松且易于管理地使用 AI 开发复杂目标。


这就是人工智能 100 天中的第 10 天。


我写了一篇名为“高于平均水平”的时事通讯,其中讨论了大型科技领域正在发生的一切背后的二阶见解。如果您从事科技行业并且不想成为平庸的人,请订阅它


TwitterLinkedIn或 ** HackerNoon ** 上关注我,了解 AI 100 天的最新动态。如果您从事技术工作,您可能有兴趣加入我的技术专业人士社区


人工智能前 100 天,第 9 天:人工智能能否为您的商业理念生成 SWOT 分析?