Skip to content

Commit 78a34a6

Browse files
Added more notes
1 parent 907a9e2 commit 78a34a6

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

blog/index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

blog/notes/2024/database-internal/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ <h2 id="resources">Resources</h2>
277277
<h2 id="resources-1">Resources</h2>
278278
<ol>
279279
<li><a href="https://medium.com/@hnasr/following-a-database-read-to-the-metal-a187541333c2">https://medium.com/@hnasr/following-a-database-read-to-the-metal-a187541333c2</a></li>
280+
<li><a href="https://dx13.co.uk/articles/2023/12/02/byo-index-pt1/">Build your own Database Index: part 1</a></li>
281+
<li><a href="https://tontinton.com/posts/database-fundementals/">Database Fundamentals</a></li>
282+
<li><a href="https://www.geeknarrator.com/blog/social-posts/ten-things-about-your-database">https://www.geeknarrator.com/blog/social-posts/ten-things-about-your-database</a></li>
283+
<li><a href="https://davidgomes.com/advanced-database-systems-part-1/">Advanced Database Systems 2024 </a></li>
280284
</ol>
281285
<p>SQL</p>
282286
<p>CLient -&gt; Query enging (thread/process per client) -&gt; storage/engine (io/treads) -&gt; Disk</p>

blog/notes/2024/kubernetes/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,8 @@ <h4 id="tools">Tools</h4>
14871487
<li><a href="https://docs.stakater.com/reloader/">Reloader</a> can watch changes in <code>ConfigMap</code> and <code>Secret</code> and do rolling upgrades on Pods</li>
14881488
<li><a href="https://karpenter.sh/">karpenter</a> Just-in-time Nodes for Any Kubernetes Cluster</li>
14891489
<li><strong><a href="https://cdk8s.io/">cdk8s</a></strong> is an open-source software development framework for defining Kubernetes applications and reusable abstractions using familiar programming languages and rich object-oriented APIs</li>
1490+
<li>Inspect all internal and external cluster communications, API transactions, and data in transit with cluster-wide monitoring of all traffic going in, out, and across containers, pods, namespaces, nodes, and clusters. <a href="https://www.kubeshark.co/">https://www.kubeshark.co/</a></li>
1491+
<li>A simple <a href="https://github.com/ofirc/k8s-sniff-https?tab=readme-ov-file">mitmproxy</a> blueprint to intercept HTTPS traffic from app running on Kubernetes</li>
14901492
</ol>
14911493
<p><code>kubectl get deployments --selector=app.kubernetes.io/instance=kubesense,app.kubernetes.io/name=api -n kubesense</code></p>
14921494
<p>to get the deployment file that match the selector</p>

blog/notes/2024/prompt-engineering/index.html

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ <h1 class="header-title">Prompt Engineering</h1>
187187
<a href="#chatml" aria-label="ChatML">ChatML</a></li>
188188
<li>
189189
<a href="#claude" aria-label="Claude">Claude</a></li>
190+
<li>
191+
<a href="#prompt-compression" aria-label="Prompt compression">Prompt compression</a></li>
190192
<li>
191193
<a href="#prompt-hacking" aria-label="Prompt Hacking">Prompt Hacking</a><ul>
192194

@@ -497,7 +499,30 @@ <h2 id="reflection-fine-tuning">Reflection Fine-Tuning</h2>
497499
<h2 id="chain-of-thought-cot">Chain-of-thought (CoT)</h2>
498500
<p> By leveraging in-context learning abilities, CoT prompting encourages a language model to more effectively solve complex problems by outputting along with its solution a corresponding “chain of thought” (i.e., a step-by-step explanation for how the problem was solved). The model can be prompted to generate a chain of thought via a few-shot learning approach that provides several chain of thought exemplars; see above. The CoT technique is most effective when the map from input to output is highly non-trivial; e.g., math or multi-step reasoning problems.</p>
499501
<p>Note: use COT for mathematical and reasoning where the perform good check out <a href="https://arxiv.org/pdf/2409.12183">here</a> for more</p>
500-
<h2 id="auto-cot">Auto COT</h2>
502+
<p>Prompt</p>
503+
<pre tabindex="0"><code> You are an AI assistant that uses a Chain of Thought (CoT) approach with reflection to answer queries. Follow these steps:
504+
505+
1. Think through the problem step by step within the &lt;thinking&gt; tags.
506+
2. Reflect on your thinking to check for any errors or improvements within the &lt;reflection&gt; tags.
507+
3. Make any necessary adjustments based on your reflection.
508+
4. Provide your final, concise answer within the &lt;output&gt; tags.
509+
510+
Important: The &lt;thinking&gt; and &lt;reflection&gt; sections are for your internal reasoning process only.
511+
Do not include any part of the final answer in these sections.
512+
The actual response to the query must be entirely contained within the &lt;output&gt; tags.
513+
514+
Use the following format for your response:
515+
&lt;thinking&gt;
516+
[Your step-by-step reasoning goes here. This is your internal thought process, not the final answer.]
517+
&lt;reflection&gt;
518+
[Your reflection on your reasoning, checking for errors or improvements]
519+
&lt;/reflection&gt;
520+
[Any adjustments to your thinking based on your reflection]
521+
&lt;/thinking&gt;
522+
&lt;output&gt;
523+
[Your final, concise answer to the query. This is the only part that will be shown to the user.]
524+
&lt;/output&gt;
525+
</code></pre><h2 id="auto-cot">Auto COT</h2>
501526
<p>Auto-CoT paradigm to automatically construct demonstrations with questions and reasoning chains. Specifically, Auto-CoT leverages LLMs with the “Let’s think step by step” prompt to generate reasoning chains for demonstrations one by one, and sending that COT with question to LLM as few shot prompting</p>
502527
<h2 id="self-consistency-with-cot">Self-consistency with (CoT)</h2>
503528
<h2 id="react">ReAct</h2>
@@ -600,6 +625,12 @@ <h2 id="claude">Claude</h2>
600625
</code></pre><ul>
601626
<li>if claude saying text after json we can use stop_sequences ask the model to wrap a json with json tag like <code>&lt;json&gt;&lt;/json&gt;</code> and we can give stop_sequences as <code>&lt;/json&gt;</code></li>
602627
</ul>
628+
<h2 id="prompt-compression">Prompt compression</h2>
629+
<p>Prompt compression is a technique used in natural language processing (NLP) to optimize the inputs given to LLMs by reducing their length without significantly altering the quality and relevance of the output.</p>
630+
<ul>
631+
<li>gpttrim (By tokenizing, stemming, and removing spaces)</li>
632+
<li>LLMLingua (A LLM developed by microsoft open source which will help to reduce the prompt)</li>
633+
</ul>
603634
<h2 id="prompt-hacking">Prompt Hacking</h2>
604635
<h3 id="output2prompt">output2prompt</h3>
605636
<p>The core idea behind output2prompt is clever in its simplicity. By analyzing patterns in the AI’s responses, another AI can infer the instructions that produced those responses.</p>

blog/notes/2024/react/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ <h2 id="state-mangement">State Mangement</h2>
733733
<li><a href="https://medium.com/the-guild/under-the-hood-of-reacts-hooks-system-eb59638c9dba">https://medium.com/the-guild/under-the-hood-of-reacts-hooks-system-eb59638c9dba</a> How hooks works under the hood</li>
734734
<li><a href="https://stackoverflow.com/questions/53974865/how-do-react-hooks-determine-the-component-that-they-are-for">https://stackoverflow.com/questions/53974865/how-do-react-hooks-determine-the-component-that-they-are-for</a></li>
735735
<li><a href="https://webdeveloper.beehiiv.com/p/build-react-400-lines-code">https://webdeveloper.beehiiv.com/p/build-react-400-lines-code</a></li>
736+
<li><a href="https://blog.frontend-almanac.com/JqtGelofzm1">https://blog.frontend-almanac.com/JqtGelofzm1</a></li>
736737
</ol>
737738
<p>Pkg</p>
738739
<ol>

0 commit comments

Comments
 (0)