Пікірлер
@bastabey2652
@bastabey2652 3 сағат бұрын
"maybe the text itself is way more expressive than the knowledge graph" ouch 1:16:10 in the age of LLM, it seems that any representation that deviates from the source text is a serious gamble
@johntanchongmin
@johntanchongmin 3 күн бұрын
Check out the repo here (Tutorial 7): github.com/simbianai/taskgen
@johntanchongmin
@johntanchongmin 3 күн бұрын
This Conversation Class shown here is for TaskGen v2.6.0. TaskGen/strictjson has been greatly revamped in v3.0.0 to work better for smaller LLMs
@rajathslr
@rajathslr 6 күн бұрын
Forgive me if my question is not correct, Are we using LLMs to build a Knowledge graph here?
@johntanchongmin
@johntanchongmin 2 күн бұрын
Indeed, I showcased how to use strict_json (LLM) to build a Knowledge Graph. We also can use KGs to provide context for LLMs, so it works both ways.
@rajathslr
@rajathslr Күн бұрын
@@johntanchongmin 'We also can use KGs to provide context for LLMs' Can you please send me any video/blog link where I can read more about this
@johntanchongmin
@johntanchongmin 18 сағат бұрын
@@rajathslr You can refer to the paper I covered in this video: arxiv.org/html/2306.08302v3 Can look at an example KG-RAG workflow here: www.nebula-graph.io/posts/KG_RAG_Bridging_Gap_Knowledge_and_Creativity_of_LLM_based_Agents
@rajathslr
@rajathslr 18 сағат бұрын
@@johntanchongmin Thanks for your time, you really rock!!
@snehotoshbanerjee1938
@snehotoshbanerjee1938 8 күн бұрын
Hi John, any reason not going with yaml vis-a-vis JSON because yaml format consume less token consumption compared to json.
@johntanchongmin
@johntanchongmin Күн бұрын
I have considered yaml before. I don't think the llms are ready for it yet. I may change my mind in the future and do a yaml version of strictjson haha.
@snehotoshbanerjee1938
@snehotoshbanerjee1938 8 күн бұрын
Cool!
@johntanchongmin
@johntanchongmin 8 күн бұрын
Update. This is live in TaskGen 4.2.1. Refer to Tutorial 6 for example of how to do Code Actions. My take: The code generated can be quite flimsy and harder to error-correct as compared to modular function calling. I think this method of using code is not very robust XD.
@snehotoshbanerjee1938
@snehotoshbanerjee1938 9 күн бұрын
John, do you have perspective on other multiagent frameworks like TaskWeaver, CrewAI (based on LC) and LangGraph?
@johntanchongmin
@johntanchongmin 9 күн бұрын
I have yet to use TaskWeaver. For CrewAI, I think it is one of the better agentic frameworks out that, but it can also be too verbose since it is conversational-based. LangGraph tries to do what TensorFlow did instead of native Python. It feels unnatural to use, I recommend not using it.
@snehotoshbanerjee1938
@snehotoshbanerjee1938 9 күн бұрын
Great content!!
@lhc6340
@lhc6340 9 күн бұрын
great content and thorough walk through. cheers!
@shimotown
@shimotown 17 күн бұрын
Agents can eat breakfast three times in a row 😂🎉🎉 great video and accent 😅
@syndicator
@syndicator 18 күн бұрын
that is freaking awesome
@geoffcounihan7093
@geoffcounihan7093 22 күн бұрын
thanks for sharing!
@snehotoshbanerjee1938
@snehotoshbanerjee1938 26 күн бұрын
As always, Fantastic video!!. Your content is just awesome. As you say "Food for thought", your video gives me a lot of content to explore :)
@johntanchongmin
@johntanchongmin 25 күн бұрын
Hope you enjoy the exploration process, come join the discord group for more intriguing conversations!
@JonnyBanana21
@JonnyBanana21 27 күн бұрын
Hi John can ChatDev help develop a Webapp/Website?
@johntanchongmin
@johntanchongmin 26 күн бұрын
Hey there, you can try it out. Website and webapp, if they are part of Python programming, could be done too. I think the baseline is whether the LLM used is robust enough to generate code for your particular application. For cases that are too complex involving multiple files, it is best to design each file separately as the context length of ChatDev is the total sum of all the content of each file you need it to generate and more.
@johntanchongmin
@johntanchongmin Ай бұрын
TaskGen repo: github.com/simbianai/taskgen
@johntanchongmin
@johntanchongmin Ай бұрын
My slides: github.com/tanchongmin/TensorFlow-Implementations/blob/main/Paper_Reviews/Code%20as%20Actions.pdf
@johntanchongmin
@johntanchongmin Ай бұрын
Github: github.com/xingyaoww/code-act Paper: arxiv.org/abs/2402.01030
@DynamicGenesis
@DynamicGenesis Ай бұрын
Thank you! Excellent teaching style 😊
@gristlelollygag
@gristlelollygag Ай бұрын
This seems very useful! Can't wait to get deeper into this, I will be needing it soon for an upcoming project
@johntanchongmin
@johntanchongmin Ай бұрын
Fun fact, at 1:11:50 onwards I repeated "I am such a failure with life" three times because of a buggy code XD (had to try 3 times to get it right) Haha live coding is fun.
@johntanchongmin
@johntanchongmin Ай бұрын
Key Highlights: 29:31 Escape Room Solver 1:09:30 Psychology Counsellor The Math Quizbot it is better done with rule-based methods, you can see 41:26 for how it can be done
@johntanchongmin
@johntanchongmin Ай бұрын
Notebook can be found here: github.com/simbianai/taskgen/blob/main/Tutorial%207%20-%20Conversation%20Class.ipynb
@gemini_537
@gemini_537 Ай бұрын
Here is a similar research for the modulo operator. project-archive.inf.ed.ac.uk/msc/20172390/msc_proj.pdf
@gemini_537
@gemini_537 Ай бұрын
Gemini 1.5 Pro: This video is about whether a neural network can model if-else statements. The speaker, John Tan Chong Min, investigates this by coding a neural network to model a simple if-else statement. The code defines a function that takes in an input x. If x is greater than 30, then the function returns 0, otherwise it returns 1. The speaker then trains the neural network on this function. The speaker finds that the neural network has difficulty modeling the if-else statement. The network can only learn a simple linear function, rather than the piecewise linear function required for the if-else statement. The speaker concludes that traditional MLPs may not be well-suited for modeling if-else statements. Here are the key points: * The speaker defines a function that takes in an input x. If x is greater than 30, then the function returns 0, otherwise it returns 1. * The speaker trains a neural network on this function. * The neural network has difficulty modeling the if-else statement. * Traditional MLPs may not be well-suited for modeling if-else statements.
@sinaardehali7295
@sinaardehali7295 Ай бұрын
Can you compare Autogen, task and langchain agents ? Which one is more mature ? Do you know any other one ?
@johntanchongmin
@johntanchongmin Ай бұрын
I think most mature is LangChain, simply because it is around longer. AutoGen is better than LangChain in getting Agents to talk to one another in a group setting. Most promising one so far I've seen is Crew.ai. TaskGen is relatively new, but it will eventually be the better option as I plan to incorporate a lot more things about memory and continual learning.
@faisalIqbal_AI
@faisalIqbal_AI Ай бұрын
Thanks
@user-wr4yl7tx3w
@user-wr4yl7tx3w Ай бұрын
Is it function calling for Llama3?
@johntanchongmin
@johntanchongmin Ай бұрын
It uses StrictJSON, which parses the LLM output into a specified json format. Check it out here: github.com/tanchongmin/strictjson
@johntanchongmin
@johntanchongmin Ай бұрын
Companion Notebook to this session: github.com/simbianai/taskgen/blob/main/TaskGen%20AMA_18May2024.ipynb
@johntanchongmin
@johntanchongmin Ай бұрын
After this session, I went to massively improve TaskGen so that it works better for non-structured tasks and also not return so many errors due to list constraining or enum constrainer in Agent subtask generation logic. The Agent is also much more receptive to environment outputs and can modify it's plan more dynamically as it is not constrained to a list of steps anymore. The notebook for this session has been updated accordingly. Try out the new TaskGen v2.0.1 today!
@johntanchongmin
@johntanchongmin Ай бұрын
Note: The information in this Notebook is largely correct, but for Functions, do take note variable names need to be enclosed by <> now, to let LLM understand better that it is an input. I will be releasing more updated tutorial videos in my StrictJSON/TaskGen channel once things become more concrete.
@FahmiFauzi-kf1wl
@FahmiFauzi-kf1wl 2 ай бұрын
Great stuff! I've been looking for ways to generate output in JSON, and this helps me a lot. Thank you
@johntanchongmin
@johntanchongmin 2 ай бұрын
Do refer to the most updated Tutorial for more information before you use it for your use case: kzbin.info/www/bejne/Z3-Qq6F6idGbhMU
@Karl-Asger
@Karl-Asger 2 ай бұрын
Looking forward to more on task gen. Great work
@johntanchongmin
@johntanchongmin 2 ай бұрын
Tomorrow is TaskGen Ask Me Anything session, join my discord group for link!
@Karl-Asger
@Karl-Asger 2 ай бұрын
@@johntanchongmin I joined the discord and saw that! Really happy for that, I spent my entire Sunday catching up on your projects through your great videos. Unfortunately I'm in CET so it will be 4am for me, but I'll catch up on it after! Thanks for sharing your work so enthusiastically 😎
@Karl-Asger
@Karl-Asger 2 ай бұрын
Amazing work John, I hope I can be part of future meetings, I love the points that you are most focused on in these developments.
@ginisksam
@ginisksam 2 ай бұрын
Hi John. Thanks for this package. Can be very powerful and flexible by adding more 'stuff' within the output_format like 'Thoughts', 'Reflection', etc. Will explore further, its so refreshing. BTW I have hooked up to Ollama API running local. Keep up the good work.
@johntanchongmin
@johntanchongmin 2 ай бұрын
Hope you like it :)
@ginisksam
@ginisksam 2 ай бұрын
Hi @@johntanchongmin Having this error ... An exception occurred: "Broad Trip Plan" not in json string output. You must use "###{key}###" to enclose the {key}. Current invalid json format: {... When using local llm. What is the likely cause. Look fwd to your kind guidance. Cheers
@johntanchongmin
@johntanchongmin 2 ай бұрын
@@ginisksam Local LLMs are likely not as good at instruction following. I'll be releasing a patch in a few days. Meanwhile you can add this line to your system prompt: "Begin your response with {{ and end with }}"
@johntanchongmin
@johntanchongmin 2 ай бұрын
@@ginisksam Could you also show me the invalid json format?
@ginisksam
@ginisksam 2 ай бұрын
@@johntanchongmin Here is snippet running cell below from strictjson_AMA...ipynb res2 = strict_json(system_prompt = '''Given the triplet list, write some code to display this as a Knowledge Graph''', user_prompt = triplet_list, output_format = {'Code': 'Code in Python to display knowledge graph from triplet list'}, llm=llm) Error: An exception occurred: list index out of range Current invalid json format: { "'###Code###': " "import networkx as nx " "from networkx.drawing.nx_agraph import write_dot " "from itertools import permutations " " " "triplets = [{ " "'obj1': 'LLM', 'relationship': 'provides', 'obj2': 'Base Functionalities'}, " "'obj1': 'Tutorial.ipynb', 'relationship': 'refers to', 'obj2': 'Base Functionalities'}, " "'obj1': 'int, float, str, dict, list', 'relationship': 'supports', 'obj2': 'Base Functionalities'}, " "'obj1': 'Dict[], List[], Enum[]', 'relationship': 'supported by', 'obj2': 'Base Functionalities'}, " "'obj1': 'bool type forcing', 'relationship': 'handled by', 'obj2': 'Base Functionalities'}, " "'obj1': 'LLM-based error correction', 'relationship': 'used for', 'obj2': 'Base Functionalities'}, " "'obj1': 'Function (renamed from strict_function)', 'relationship': 'available in', 'obj2': 'Base Functionalities'}, " "'obj1': 'OpenAI JSON Mode', 'relationship': 'enabled by', 'obj2': 'Base Functionalities'}, " "'obj1': 'llm variable', 'relationship': 'exposed for', 'obj2': 'strict_json, Function'} " "] " " " "# Create a graph " "G = nx.DiGraph() " " " "# Add nodes and edges from triplets " "for obj1, rel, obj2 in triplets: " " G.add_edge(obj1, obj2, relationship=rel) " ... Thanks for your continous guidance.
@johntanchongmin
@johntanchongmin 2 ай бұрын
Companion Notebook for this Tutorial: github.com/tanchongmin/strictjson/blob/main/strictjson_AMA_30Apr2024.ipynb
@johntanchongmin
@johntanchongmin 2 ай бұрын
Repo Link: github.com/tanchongmin/strictjson
@johntanchongmin
@johntanchongmin 2 ай бұрын
If you want the reference links to have a hyperlink to the exact place it is mentioned, insert \usepackage{hyperref}
@johntanchongmin
@johntanchongmin 2 ай бұрын
Overleaf (free account can co-write online with 1 other person): www.overleaf.com/ Google Scholar: scholar.google.com/ Llama 3: www.meta.ai/ ChatGPT: chat.openai.com/
@johntanchongmin
@johntanchongmin 2 ай бұрын
Basic prompt to generate overall paper code (Note: Use style guide if you have one for the conference): Give me sample latex for a research paper titled “Llama 3: Uses and Applications”. Include all useful packages for a research paper. Fill in all sections with placeholders. Use bib latex named “references.bib” for references. Basic prompt to generate code for specific figure, table, equation: Generate me latex code for <insert specific guidelines here> Basic prompt to refine the latex code: <Existing latex code snippet> <Your requested changes>
@chrisogonas
@chrisogonas 2 ай бұрын
While I also appreciate the flexibility of knowledge graphs (KGs) as far as them being able to easily represent relationships, I too agree with you that KGs are not necessarily the best or most effective way to represent intelligence. I will stay in tune with your works. I hope to publish on this in the near future. Thanks for the presentation.
@johntanchongmin
@johntanchongmin 2 ай бұрын
Glad it helps. I am actively pursuing my idea of multiple abstraction spaces, and KG can be one of them. The rest of how we store memory will depend on what kind of memory - semantic facts, episodic memory and so on. These can be stored in various ways like traditional databases, or even in video/image format.
@chrisogonas
@chrisogonas 2 ай бұрын
@@johntanchongmin Thanks for sharing your research. I will particularly follow closely your work on context-dependent embeddings. That's an exciting angle to explore in depth.
@moglixdhd
@moglixdhd 2 ай бұрын
buuuuuu where is the footage! i cant trust u
@johntanchongmin
@johntanchongmin 2 ай бұрын
Haha what footage?
@johntanchongmin
@johntanchongmin 2 ай бұрын
Slides can be found here: github.com/tanchongmin/TensorFlow-Implementations/blob/main/Paper_Reviews/SORA.pdf
@boonkiathan
@boonkiathan 2 ай бұрын
honestly until Sora is publicly released (like stable diff), even to a select group of public influencers, to prompt we are looking at output that may be - from a much longer prompt - selected from a wide range of many failed output generation - carefully picked from video capability that is confident from the training set esp. avoiding fast movements, hand and eyes,occlusion etc... not to say, it may be tens of thousands in undivulged GPU/APU costs i believe it is not edited that is as much as I can trust OpenAI
@johntanchongmin
@johntanchongmin 2 ай бұрын
That said, the spacetime patches is an interesting idea, and if it works out, could form the basis of a lot of innovation in the video prediction domain.
@johntanchongmin
@johntanchongmin 2 ай бұрын
References Part 2: Blog comparing between DALL-E, Stable Diffusion, Imagen: tryolabs.com/blog/2022/08/31/from-dalle-to-stable-diffusion Paper Attempting to reverse engineer SORA (I only agree with 20% of the paper): arxiv.org/abs/2402.17177 Vision Transformer: arxiv.org/abs/2010.11929 Good blog post about Vision Transformer: towardsdatascience.com/vision-transformers-explained-a9d07147e4c8 Diffusion Transformer: arxiv.org/abs/2212.09748
@johntanchongmin
@johntanchongmin 2 ай бұрын
References: SORA main page: openai.com/sora SORA technical report: openai.com/research/video-generation-models-as-world-simulators OpenAI CLIP Image and Text Embeddings: arxiv.org/abs/2103.00020 DALL-E: arxiv.org/abs/2102.12092 DALL-E 2: arxiv.org/abs/2204.06125 DALL-E 3: cdn.openai.com/papers/dall-e-3.pdf Stable Diffusion: arxiv.org/abs/2112.10752 Stable Diffusion XL - Making Stable Diffusion more high res: arxiv.org/abs/2307.01952 Stable Diffusion 3: arxiv.org/pdf/2403.03206.pdf ControlNet - adding more conditions to Stable Diffusion: arxiv.org/abs/2302.05543 I-JEPA (META): ai.meta.com/blog/yann-lecun-ai-model-i-jepa/ V-JEPA (META): ai.meta.com/blog/v-jepa-yann-lecun-ai-model-video-joint-embedding-predictive-architecture/ Make-a-video (META): ai.meta.com/blog/generative-ai-text-to-video/ Imagen (Google): arxiv.org/abs/2205.11487 Denoising Diffusion Probabilistic Models (DDPM) - Diffusion in Pixel Space: arxiv.org/abs/2006.11239
@KimSiaSim
@KimSiaSim 2 ай бұрын
are the examples such as AWS Bot, etc are open sourced, by any chance?
@johntanchongmin
@johntanchongmin 2 ай бұрын
Brian has open sourced most of them on the TaskGen repo!
@johntanchongmin
@johntanchongmin 2 ай бұрын
1:07:31 This is a mistake on my end - this is not the ImageNet Supervised Learning model. Li. et. al. is actually the Visual N-gram model where they predict n-grams (n words) for each picture. arxiv.org/pdf/1612.09161.pdf Here, I believe they did not even implement out their model (it is quite low performance of 10+% accuracy on ImageNet), but rather, just use the method of how they use the class name text directly. They applied this on CLIP. Basically, the paper was misleading - they did not even need to refer to Li. et. al. for that chart as the methodology is totally different. It is just CLIP with ImageNet class names without any added prompt engineering.
@johntanchongmin
@johntanchongmin 2 ай бұрын
For the loss function at 1:00:15, they use Cross Entropy Loss with the input as the unnormalised logits (multiply by exponent term with temperature t). That is why there is a need to multiply the resultant cosine similarity matrix with the logits. In the Cross Entropy Loss function, this will be divided further by the summation of all other input terms multiplied by the exponent term (otherwise known as normalised). See pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html for details.
@johntanchongmin
@johntanchongmin 2 ай бұрын
CLIP's loss function has also been described as InfoNCE loss, a common loss term for contrastive learning. See builtin.com/machine-learning/contrastive-learning for details. It is essentially Cross Entropy over cosine similarity terms, which is what is done in CLIP.
@johntanchongmin
@johntanchongmin 2 ай бұрын
At 58:22, the weights W_i and W_t are the projections of the embedding space form the image model output and text model output respectively (allows for change in embedding dimension). This allows for more generic text and image models with different output dimensions, and they can all map to the same embedding dimension.