Skip to content

Commit b754a31

Browse files
restructure spark chapter
1 parent f032e69 commit b754a31

File tree

11 files changed

+176
-76
lines changed

11 files changed

+176
-76
lines changed

Chapter5/llm.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@
607607
],
608608
"metadata": {
609609
"kernelspec": {
610-
"display_name": "Python 3 (ipykernel)",
610+
"display_name": "venv",
611611
"language": "python",
612612
"name": "python3"
613613
},

Chapter5/spark.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"id": "06ae6e73-bfad-45fb-b338-048da0c0c789",
1414
"metadata": {},
1515
"source": [
16-
"## 3 Powerful Ways to Create PySpark DataFrames"
16+
"### 3 Powerful Ways to Create PySpark DataFrames"
1717
]
1818
},
1919
{

docs/Chapter5/Chapter5.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,23 @@
272272
<li class="toctree-l2"><a class="reference internal" href="testing.html">6.13. Testing</a></li>
273273
<li class="toctree-l2"><a class="reference internal" href="SQL.html">6.14. SQL Libraries</a></li>
274274
<li class="toctree-l2"><a class="reference internal" href="spark.html">6.15. 3 Powerful Ways to Create PySpark DataFrames</a></li>
275-
<li class="toctree-l2"><a class="reference internal" href="llm.html">6.16. Large Language Model (LLM)</a></li>
275+
276+
277+
278+
279+
280+
281+
282+
283+
284+
285+
286+
287+
288+
289+
290+
291+
<li class="toctree-l2"><a class="reference internal" href="llm.html">6.32. Large Language Model (LLM)</a></li>
276292
</ul>
277293
</li>
278294
<li class="toctree-l1 has-children"><a class="reference internal" href="../Chapter6/Chapter6.html">7. Cool Tools</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-7"><i class="fa-solid fa-chevron-down"></i></label><ul>

docs/Chapter5/llm.html

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<meta charset="utf-8" />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
1111

12-
<title>6.16. Large Language Model (LLM) &#8212; Effective Python for Data Scientists</title>
12+
<title>6.32. Large Language Model (LLM) &#8212; Effective Python for Data Scientists</title>
1313

1414

1515

@@ -272,7 +272,23 @@
272272
<li class="toctree-l2"><a class="reference internal" href="testing.html">6.13. Testing</a></li>
273273
<li class="toctree-l2"><a class="reference internal" href="SQL.html">6.14. SQL Libraries</a></li>
274274
<li class="toctree-l2"><a class="reference internal" href="spark.html">6.15. 3 Powerful Ways to Create PySpark DataFrames</a></li>
275-
<li class="toctree-l2 current active"><a class="current reference internal" href="#">6.16. Large Language Model (LLM)</a></li>
275+
276+
277+
278+
279+
280+
281+
282+
283+
284+
285+
286+
287+
288+
289+
290+
291+
<li class="toctree-l2 current active"><a class="current reference internal" href="#">6.32. Large Language Model (LLM)</a></li>
276292
</ul>
277293
</li>
278294
<li class="toctree-l1 has-children"><a class="reference internal" href="../Chapter6/Chapter6.html">7. Cool Tools</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-7"><i class="fa-solid fa-chevron-down"></i></label><ul>
@@ -513,10 +529,10 @@ <h2> Contents </h2>
513529
</div>
514530
<nav aria-label="Page">
515531
<ul class="visible nav section-nav flex-column">
516-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#simplify-llm-integration-with-magentic-s-prompt-decorator">6.16.1. Simplify LLM Integration with Magentic’s @prompt Decorator</a></li>
517-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#outlines-ensuring-consistent-outputs-from-language-models">6.16.2. Outlines: Ensuring Consistent Outputs from Language Models</a></li>
518-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#mirascope-extract-structured-data-extraction-from-llm-outputs">6.16.3. Mirascope: Extract Structured Data Extraction From LLM Outputs</a></li>
519-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#maximize-accuracy-and-relevance-with-external-data-and-llms">6.16.4. Maximize Accuracy and Relevance with External Data and LLMs</a></li>
532+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#simplify-llm-integration-with-magentic-s-prompt-decorator">6.32.1. Simplify LLM Integration with Magentic’s @prompt Decorator</a></li>
533+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#outlines-ensuring-consistent-outputs-from-language-models">6.32.2. Outlines: Ensuring Consistent Outputs from Language Models</a></li>
534+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#mirascope-extract-structured-data-extraction-from-llm-outputs">6.32.3. Mirascope: Extract Structured Data Extraction From LLM Outputs</a></li>
535+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#maximize-accuracy-and-relevance-with-external-data-and-llms">6.32.4. Maximize Accuracy and Relevance with External Data and LLMs</a></li>
520536
</ul>
521537
</nav>
522538
</div>
@@ -529,9 +545,9 @@ <h2> Contents </h2>
529545
<article class="bd-article" role="main">
530546

531547
<section id="large-language-model-llm">
532-
<h1><span class="section-number">6.16. </span>Large Language Model (LLM)<a class="headerlink" href="#large-language-model-llm" title="Permalink to this heading">#</a></h1>
548+
<h1><span class="section-number">6.32. </span>Large Language Model (LLM)<a class="headerlink" href="#large-language-model-llm" title="Permalink to this heading">#</a></h1>
533549
<section id="simplify-llm-integration-with-magentic-s-prompt-decorator">
534-
<h2><span class="section-number">6.16.1. </span>Simplify LLM Integration with Magentic’s &#64;prompt Decorator<a class="headerlink" href="#simplify-llm-integration-with-magentic-s-prompt-decorator" title="Permalink to this heading">#</a></h2>
550+
<h2><span class="section-number">6.32.1. </span>Simplify LLM Integration with Magentic’s &#64;prompt Decorator<a class="headerlink" href="#simplify-llm-integration-with-magentic-s-prompt-decorator" title="Permalink to this heading">#</a></h2>
535551
<div class="cell tag_hide-cell docutils container">
536552
<details class="hide above-input">
537553
<summary aria-label="Toggle hidden content">
@@ -636,7 +652,7 @@ <h2><span class="section-number">6.16.1. </span>Simplify LLM Integration with Ma
636652
<p><a class="reference external" href="https://github.com/jackmpcollins/magentic">Link to magentic</a>.</p>
637653
</section>
638654
<section id="outlines-ensuring-consistent-outputs-from-language-models">
639-
<h2><span class="section-number">6.16.2. </span>Outlines: Ensuring Consistent Outputs from Language Models<a class="headerlink" href="#outlines-ensuring-consistent-outputs-from-language-models" title="Permalink to this heading">#</a></h2>
655+
<h2><span class="section-number">6.32.2. </span>Outlines: Ensuring Consistent Outputs from Language Models<a class="headerlink" href="#outlines-ensuring-consistent-outputs-from-language-models" title="Permalink to this heading">#</a></h2>
640656
<p>The Outlines library enables controlling the outputs of language models. This makes the outputs more predictable, ensuring the reliability of systems using large language models.</p>
641657
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">outlines</span>
642658

@@ -664,7 +680,7 @@ <h2><span class="section-number">6.16.2. </span>Outlines: Ensuring Consistent Ou
664680
<p><a class="reference external" href="https://github.com/outlines-dev/outlines">Link to Outlines</a>.</p>
665681
</section>
666682
<section id="mirascope-extract-structured-data-extraction-from-llm-outputs">
667-
<h2><span class="section-number">6.16.3. </span>Mirascope: Extract Structured Data Extraction From LLM Outputs<a class="headerlink" href="#mirascope-extract-structured-data-extraction-from-llm-outputs" title="Permalink to this heading">#</a></h2>
683+
<h2><span class="section-number">6.32.3. </span>Mirascope: Extract Structured Data Extraction From LLM Outputs<a class="headerlink" href="#mirascope-extract-structured-data-extraction-from-llm-outputs" title="Permalink to this heading">#</a></h2>
668684
<div class="cell tag_hide-cell docutils container">
669685
<details class="hide above-input">
670686
<summary aria-label="Toggle hidden content">
@@ -732,7 +748,7 @@ <h2><span class="section-number">6.16.3. </span>Mirascope: Extract Structured Da
732748
<p><a class="reference external" href="https://bit.ly/4bkciv3">Link to Mirascope</a>.</p>
733749
</section>
734750
<section id="maximize-accuracy-and-relevance-with-external-data-and-llms">
735-
<h2><span class="section-number">6.16.4. </span>Maximize Accuracy and Relevance with External Data and LLMs<a class="headerlink" href="#maximize-accuracy-and-relevance-with-external-data-and-llms" title="Permalink to this heading">#</a></h2>
751+
<h2><span class="section-number">6.32.4. </span>Maximize Accuracy and Relevance with External Data and LLMs<a class="headerlink" href="#maximize-accuracy-and-relevance-with-external-data-and-llms" title="Permalink to this heading">#</a></h2>
736752
<div class="cell tag_hide-cell docutils container">
737753
<details class="hide above-input">
738754
<summary aria-label="Toggle hidden content">
@@ -984,10 +1000,10 @@ <h2><span class="section-number">6.16.4. </span>Maximize Accuracy and Relevance
9841000
</div>
9851001
<nav class="bd-toc-nav page-toc">
9861002
<ul class="visible nav section-nav flex-column">
987-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#simplify-llm-integration-with-magentic-s-prompt-decorator">6.16.1. Simplify LLM Integration with Magentic’s @prompt Decorator</a></li>
988-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#outlines-ensuring-consistent-outputs-from-language-models">6.16.2. Outlines: Ensuring Consistent Outputs from Language Models</a></li>
989-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#mirascope-extract-structured-data-extraction-from-llm-outputs">6.16.3. Mirascope: Extract Structured Data Extraction From LLM Outputs</a></li>
990-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#maximize-accuracy-and-relevance-with-external-data-and-llms">6.16.4. Maximize Accuracy and Relevance with External Data and LLMs</a></li>
1003+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#simplify-llm-integration-with-magentic-s-prompt-decorator">6.32.1. Simplify LLM Integration with Magentic’s @prompt Decorator</a></li>
1004+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#outlines-ensuring-consistent-outputs-from-language-models">6.32.2. Outlines: Ensuring Consistent Outputs from Language Models</a></li>
1005+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#mirascope-extract-structured-data-extraction-from-llm-outputs">6.32.3. Mirascope: Extract Structured Data Extraction From LLM Outputs</a></li>
1006+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#maximize-accuracy-and-relevance-with-external-data-and-llms">6.32.4. Maximize Accuracy and Relevance with External Data and LLMs</a></li>
9911007
</ul>
9921008
</nav></div>
9931009

0 commit comments

Comments
 (0)