AIシェフ

公開日
2024年12月19日
著者
Jacob Lloyd — プロジェクト完了後、AIの支援を受けて執筆
読了時間
約16分で読めます

かんたんに言うと: 無料でコピペできる指示文ひとつで、チャットAIが親切な献立プランナーに早変わり。1週間分の夕食を提案し、レシピと、売り場ごとに整理済みの買い物リストまで作ってくれます。「今晩なに作ろう?」の悩みをお金をかけずに解消できます。

システムプロンプトをひとつコピペするだけで、チャットモデルが献立プランナーになります。1週間分の夕食、そのレシピ、売り場ごとに仕分け済みの買い物リストまで一式。名前はProChef。帽子をかぶっています。

tl;dr

  • これは何: チャットAIに1週間の献立を立てさせるシステムプロンプト(「ProChef」)です。
  • 費用: ゼロ。ただのプロンプトなので。
  • 必要なもの: チャットモデルなら何でも。うちはOllama + Open WebUIをローカルで動かしていますが、普通のChatGPTでもOKです。
  • 得られるもの: 1週間の夕食プラン、手順つきレシピ、売り場別にまとまった買い物リスト。

できあがるもの

Open WebUIのチャット画面。ProChefに『冒険的だけどヘルシーな夕食』を頼むと、ハリッササーモンからベトナム風レモングラスビーフボウルまで、『エキゾチックな味』のレシピ候補が5つ返ってくる。
メッセージ1通で夕食の候補が5つ。Open WebUIでローカル動作中のDeepSeek R1-70Bです。

欲しいものを伝えると献立を提案してくるので、気に入ったものを選び、レシピと買い物リストを頼みます。リストは青果・肉魚・穀物・調味料といった売り場別にまとまって返ってきます。店で本当に時間を節約できるのはこの部分です。

必要なもの

うちの環境はローカルです。RTX 3090が2枚とThreadripperで、バックエンドにOllama、フロントエンドにOpen WebUI。VRAMが48GBあるなら、そっくりそのまま真似できます。

なくても気にしないでください。システムプロンプトを受け付けるツールなら何でも動きますし、その欄がないツールでも、ChatGPTのように同じテキストを最初のメッセージとして貼れば済みます。

おまけのシェフの似顔絵にはgetimg.aiを使いました。スポンサーでも提携でもなく、単に自分が使っているだけです。

モデルの準備

Ollamaなら、DeepSeek R1-70Bをpullします。「70Bモデルを自宅で動かす」がひと仕事に聞こえるなら、実際ひと仕事です — 手順は4ステップのローカルDeepSeekガイドにまとめてあります。

ChatGPTなどのホスト型サービスなら、デフォルトのモデルで十分です。レシピ寄りのモデルが選べるなら、それでもどうぞ。

重要な設定はひとつだけ。モデルパラメータで、コンテキストウィンドウをVRAMに収まる値にします(うちのDeepSeek R1-70Bだと約5,000トークン。モデル本体が48GBをほぼ食い尽くすので、コンテキストには残りかすしか回ってきません)。設定したら保存します。

ProChefシステムプロンプト

先に白状しておくと、このプロンプトはAIに手伝わせて書きました。だから「seamless user interaction」のような、人間が声に出して言ったことのないフレーズが混ざっています。それでも動くので、そのままにしてあります。ボックスの中身を一字一句そのままコピーしてください。最後のIMPORTANT行も含めてです。あの行は、モデルが買い物リストから材料をこっそり落とし続けたせいで生まれました。

プロンプト本文は英語のままですが、そのままコピーしてください。会話自体は日本語で話しかければ、たいていのモデルは日本語で返してくれます。

ProChefシステムプロンプト(全部コピーすること)

First: suggest recipes for a meal plan, don't give full recipes or grocery lists until asked.

You are ProChef, a streamlined AI chef assistant designed to simplify meal planning and preparation. Your primary tasks include determining weekly meals based on user preferences, generating detailed ingredient lists with quantities for each selected dish, providing step-by-step cooking directions upon request, and finally creating an organized grocery list when prompted.

Workflow:
1. Meal Determination: Collaborate with the user to establish a meal plan for the week by understanding their dietary restrictions (vegetarian, gluten-free, etc.), budget, time constraints, food preferences, and any specific requests or events.
2. Ingredient Lists & Cooking Directions: Once meals are determined, upon user request, generate precise ingredient lists with quantities for each dish and provide clear, step-by-step cooking directions for preparing the selected meals.
3. Grocery List Generation: When prompted by the user, create a comprehensive grocery list organized by grocery store sections (e.g., produce, dairy, grains). Ensure all necessary ingredients are listed, taking into account standard pantry staples that might not need to be purchased. Allow users to adjust quantities or remove items they already have.

Key Specifications:
- User Interaction: Maintain a straightforward and responsive interface for seamless user interaction, ensuring clarity in communication regarding meal plans, ingredient lists, cooking instructions, and grocery lists.
- Accuracy and Completeness: Prioritize the accuracy of information provided. All ingredients must be listed completely to prevent any missing items during shopping or preparation.
- Organizational Efficiency: Organize the grocery list by typical grocery store sections for efficient shopping experiences.

Example User Interaction:
User: "I'm ready to make my grocery list."
ProChef: "Here's your organized grocery list. Under 'Produce,' you'll need: 1 head of lettuce, 3 tomatoes... Under 'Dairy'..."

By following this streamlined workflow, ProChef ensures that users can efficiently plan, shop for, and prepare their meals with all necessary ingredients accounted for.

IMPORTANT: after generating a grocery list, check the list against the recipes for all ingredients, both implied and called out, to verify all ingredients are accounted for.

貼り付け先はこうです。ツールにシステムプロンプト欄があるなら(Open WebUIならモデル設定の中)、そこに貼って保存。なければ — ChatGPTもこちら側です — 新しいチャットの最初のメッセージとして同じテキストをそのまま貼って、あとは普通に続けるだけ。結果は同じです。

おまけ:シェフに顔をつける

完全に不要な工程です。でもやりました。無地のアバターに話しかけるより、ちっちゃい幾何学シェフに話しかけるほうが楽しいので。5分の寄り道です。

シェフのロゴを作ったgetimg.aiの設定

モード: AI Image Generator、Essential
モデル: Flux.1
プロンプト: geometric image of a cute chef. Happy and ready to help generate delicious food. he has a mustache and hat which covers his eyes.
ネガティブプロンプト: Disfigured, cartoon, blurry, nude, background, weapon
生成枚数: 惜しいところまでは2枚ずつ、最終ラウンドで10枚に上げます。

getimg.aiのEssential生成画面。シェフのプロンプトが入力され、Flux.1が選択されていて、右側に候補のシェフ画像が3枚並んでいる。
私のプロンプトを読み込んだ生成画面。好きにいじってください。あなたのシェフですから。

生成して、プロンプトを直して、また生成。この子にたどり着くまでに、プロンプト修正が十数回、画像はたぶん100枚くらいかかりました。勝者を1枚選んで、必要ならアップスケールして、ダウンロードして、モデルのアバターに設定します。

完成したProChefロゴ。口ヒゲを生やし、目まで帽子を深くかぶった幾何学調のシェフ。
優勝作。目が帽子で隠れていることだけは譲れませんでした。

1週間分の食事を頼む

条件を伝えて、提案させます。例えばこんな感じです:

来週の夕食に、ちょっと冒険したメニューを組んでほしい。ヘルシーで味もそそられるレシピを5つ提案して。選択肢は2つ以上ほしい。夕食だけでお願いします

候補の献立が返ってきます。納得いくまで注文をつけて、決まったらレシピと分量、最後に買い物リストを頼みます。プロンプトはわざと「聞かれるまでレシピを出さない」作りになっているので、献立を確認するためだけに長文をスクロールする羽目にはなりません。

実例(無編集)

以下はすべて一発目の回答そのままです。リトライなし、手直しなし。やり取りは英語だったので、出力も英語のまま載せています。結果は毎回変わります。

例:義母を喜ばせるイタリアン尽くしの祝日ウィーク

依頼内容:

チャットメッセージ(英語):1週間分の食事リストを生成してほしい。簡単に作れて、イタリア人の義母が喜ぶ祝日週のごちそうで、という依頼。
ProChefの返信(英語)。簡単だけど見栄えのするイタリア料理というリクエストを受けて、献立の提案を始めている。

返ってきたのは手堅い1週間でした。月曜はブルスケッタとミネストローネ、以降はチキン入りペストパスタ、ナスのパルミジャーナ、フェットチーネ・アルフレード、チキンピカタ、焼き野菜とグリルフィッシュ、締めの日曜は定番のラザニアとシーザーサラダ。奇をてらわず、全部が「知ってる料理」。今回の想定読者を考えれば、それが正解です。

続けてレシピ本体を頼みます:

追いメッセージ(英語):リストにあるイタリア料理それぞれについて、材料と手順つきのレシピを生成して、という依頼。

……ちゃんと完全な手順が返ってきます。その壁のようなテキストは省略しますね。次の例に全文があります。

例:乳糖不耐症の夫婦の1週間 — 出力全文つき

依頼内容(意訳):「乳糖不耐症の妻とその夫のための1週間の夕食プランを。材料は最小限、調理手順はシンプルに、売り場別にまとめた買い物リストつきで」

モデルの回答、一字一句そのまま(英語):

Weekly Dinner Meal Plan

Monday: Grilled Salmon with Quinoa Salad

  • Ingredients: Salmon fillets, quinoa, bell peppers, broccoli, snap peas, lemon juice.
  • Instructions: Grill salmon, cook quinoa, mix with roasted vegetables, dress with lemon juice.

Tuesday: Chicken Stir-Fry with Rice

  • Ingredients: Chicken breast, rice, bell peppers, broccoli, snap peas, soy sauce/tamari.
  • Instructions: Stir-fry chicken and vegetables in olive oil, serve over rice.

Wednesday: Spaghetti Squash with Ground Turkey Tomato Sauce

  • Ingredients: Spaghetti squash, ground turkey, tomato sauce (dairy-free), garlic.
  • Instructions: Bake spaghetti squash, cook ground turkey with tomato sauce, combine.

Thursday: Tacos with Ground Beef/Turkey and Veggies

  • Ingredients: Corn tortillas, ground beef/turkey, lettuce, tomatoes, avocado, taco seasoning.
  • Instructions: Cook ground meat with taco seasoning, serve in tortillas with vegetables.

Friday: Baked Cod with Asparagus and Potatoes

  • Ingredients: Cod fillets, asparagus, potatoes, lemon juice, herbs (thyme, rosemary).
  • Instructions: Bake cod, roast asparagus and potatoes with olive oil and seasonings.

Saturday: Shrimp Skewers with Peanut Sauce over Couscous

  • Ingredients: Shrimp, couscous, peanut butter, garlic.
  • Instructions: Grill shrimp skewers, cook couscous, serve with peanut sauce.

Sunday: Turkey Burgers over Greens

  • Ingredients: Turkey burgers (or patties), lettuce, tomatoes, onion, avocado.
  • Instructions: Cook turkey burgers, serve on a bed of greens with vegetables.

Grocery List by Store Sections

Produce:

  • Bell peppers (2)
  • Broccoli (1 head)
  • Snap peas (1 cup)
  • Lettuce (1 head)
  • Tomatoes (3)
  • Avocado (3)
  • Asparagus (1 bunch)
  • Potatoes (4 medium)
  • Zucchini (1)
  • Yellow squash (1)
  • Onion (2)
  • Cucumber (1)
  • Olives (optional)
  • Spinach (1 bag)
  • Lemons (2)

Proteins:

  • Salmon fillets (4 portions)
  • Chicken breasts (4 portions)
  • Ground turkey (1 lb for spaghetti squash and 1 lb for tacos/ground beef alternative)
  • Cod fillets (4 portions)
  • Shrimp (1 bag, frozen)
  • Turkey burgers (4 patties) or ground turkey to make patties

Grains:

  • Quinoa (2 cups)
  • Rice (2 cups)
  • Corn tortillas (8-10)
  • Couscous (2 cups)

Pantry:

  • Olive oil
  • Coconut oil
  • Soy sauce/tamari
  • Tomato sauce (dairy-free)
  • Taco seasoning
  • Peanut butter
  • Salt and pepper
  • Herbs (oregano, basil, thyme, rosemary)

Miscellaneous:

  • Garlic
  • Lemon zest or juice

This meal plan ensures minimal ingredients overlap, simple cooking techniques, and no dairy products. Enjoy your week of delicious and easy meals!

青果コーナーに、上のどのレシピにも登場しないズッキーニ、イエロースカッシュ、きゅうり、オリーブ、ほうれん草が並んでいるのに注目してください。パントリーにはココナッツオイルまで。おまけ野菜、ということにしておきましょう。プロンプトにリストの再確認を命じる行があるのはまさにこのためで、それでも自分の目でざっと見直すべき理由でもあります。

例:グルテンフリーの1週間(2人分)

依頼内容(意訳):「グルテン不耐症の妻とその夫のための1週間の献立を。調理手順つきの食事と、売り場別にまとめた買い物リストを含めて」

形は乳糖不耐症の例と同じでした。グルテンフリーの夕食7日分(グリルチキンと焼き野菜、たまり醤油の炒め物、ピーマンの肉詰め、ズッキーニヌードルのエビのせ、日曜はビーフシチュー)に、売り場別の買い物リスト。ブイヨンに至るまで全部グルテンフリー表記つき。前の例を読んだなら、これも読んだも同然です。

例:週末のデートディナー

依頼内容(意訳):「新しいタスク。週末に彼女に作るディナープランを一式。感動してもらえる料理で、各食事の完全な手順と、売り場別の買い物リストもお願い」

全力でロマンチックに振り切ってきました。金曜はマンゴーサルサのグリルサーモン、土曜はラムのローストとガーリックマッシュポテト、日曜は赤ワインソースの牛テンダーロイン。完全なレシピと買い物リスト、そして真顔で「皿は美しく盛り付けましょう」というアドバイスまで。締めの一言は「Enjoy your culinary journey!」。誰が書いた文章か、これでよく分かります。メニュー自体は文句なしに良かったのですが。

ハマりどころ

  • ローカル環境ではコンテキストがカツカツです。 48GBのVRAMで70Bモデルを動かすと、残るウィンドウは約5,000トークン。献立+レシピ+買い物リストで軽くあふれて、モデルが会話の最初のほうを忘れ始めます。毎週新しいチャットで始めて、長くなる前に買い物リストを頼むこと。
  • 材料を落とすし、勝手に足しもします。 プロンプト末尾のIMPORTANT行は、レシピに明らかに必要な材料が買い物リストから抜け続けたせいで追加したものです。効きはしますが、完治はしません。買い物前にレシピと突き合わせてください。
  • 分量には疑いの目を。 牛肉の担当だったタコスに、七面鳥のひき肉を要求してきたリストがありました。買い物には使えるレベル、でも鵜呑みは禁物です。
  • 推論モデルは話す前に考え込みます。 R1は回答前にしばらくじっくり考えます。献立くらいの用事なら問題なし — フリーズしたと勘違いしないように。

← AIとローカルLLMをもっと見る